summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunling Zheng <zhengjunling@huawei.com>2018-03-29 19:27:12 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-04-08 03:51:24 -0700
commit86444d6006929a57706be791a09e1e77f9fd6fdd (patch)
tree411a47fb666b6985b8f9d223b3d0e8886c5ae840
parentdb2188a68704bd120d32836bc5ac273dc26b4617 (diff)
f2fs: fix a wrong condition in f2fs_skip_inode_update
Fix commit 97dd26ad8347 (f2fs: fix wrong AUTO_RECOVER condition). We should use ~PAGE_MASK to determine whether i_size is aligned to the f2fs's block size or not. Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/f2fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 2ede2e36f30f..1ca32899af2b 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2535,7 +2535,7 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync)
}
if (!is_inode_flag_set(inode, FI_AUTO_RECOVER) ||
file_keep_isize(inode) ||
- i_size_read(inode) & PAGE_MASK)
+ i_size_read(inode) & ~PAGE_MASK)
return false;
down_read(&F2FS_I(inode)->i_sem);