Commit 97dd26ad authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: fix wrong AUTO_RECOVER condition

If i_size is not aligned to the f2fs's block size, we should not skip inode
update during fsync.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 3a3a5ead
...@@ -1721,7 +1721,8 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync) ...@@ -1721,7 +1721,8 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync)
spin_unlock(&sbi->inode_lock[DIRTY_META]); spin_unlock(&sbi->inode_lock[DIRTY_META]);
return ret; return ret;
} }
if (!is_inode_flag_set(inode, FI_AUTO_RECOVER)) if (!is_inode_flag_set(inode, FI_AUTO_RECOVER) ||
i_size_read(inode) & PAGE_MASK)
return false; return false;
return F2FS_I(inode)->last_disk_size == i_size_read(inode); return F2FS_I(inode)->last_disk_size == i_size_read(inode);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment