diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-11-16 18:53:16 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-11-25 10:16:05 -0800 |
commit | 97dd26ad834739d4e4ea35fd7ab5f92824de4cbb (patch) | |
tree | b9bcf8a2322a9a6bb4a17061f179879f8f9c2d5c | |
parent | 3a3a5ead7b6d2c9a29f493791ba23f264052db34 (diff) | |
download | linux-97dd26ad834739d4e4ea35fd7ab5f92824de4cbb.tar.bz2 |
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: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/f2fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 3f91cb53d545..62383d20a69f 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1721,7 +1721,8 @@ static inline bool f2fs_skip_inode_update(struct inode *inode, int dsync) spin_unlock(&sbi->inode_lock[DIRTY_META]); 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 F2FS_I(inode)->last_disk_size == i_size_read(inode); } |