Skip to content

Commit

Permalink
f2fs: fix a wrong condition in f2fs_skip_inode_update
Browse files Browse the repository at this point in the history
Fix commit 97dd26a (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>
  • Loading branch information
Junling Zheng authored and Jaegeuk Kim committed Apr 2, 2018
1 parent 53fedcc commit 235831d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 235831d

Please sign in to comment.