diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-21 06:42:37 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-03 04:05:13 +0300 |
commit | 26de9b11713057a16a9220423a2f137774763b0e (patch) | |
tree | cf238a2873c5b3befbe1499f9005de554a759a9e /fs/f2fs/file.c | |
parent | ee6d182f2a19d5d44607b5ae4bec523726d76a99 (diff) | |
download | linux-26de9b11713057a16a9220423a2f137774763b0e.tar.xz |
f2fs: avoid unnecessary updating inode during fsync
If roll-forward recovery can recover i_size, we don't need to update inode's
metadata during fsync.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 73bc946974ad..23decf050236 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -208,7 +208,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end, } /* if the inode is dirty, let's recover all the time */ - if (!datasync) { + if (!datasync && !f2fs_skip_inode_update(inode)) { f2fs_write_inode(inode, NULL); goto go_write; } @@ -251,7 +251,7 @@ go_write: goto out; } sync_nodes: - ret = fsync_node_pages(sbi, ino, &wbc, atomic); + ret = fsync_node_pages(sbi, inode, &wbc, atomic); if (ret) goto out; |