From: Junling Zheng Date: Thu, 29 Mar 2018 11:27:12 +0000 (+0800) Subject: f2fs: fix a wrong condition in f2fs_skip_inode_update X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=235831d7dd783ebd20e08ef4310dbdeeea46d87a;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 96d7809c4541..000f93f6767e 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2471,7 +2471,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);