summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-04-15 09:30:53 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2019-05-09 06:23:10 +0200
commitcd23ffa9fcba071c6a6129c46bf41acca77fab4a (patch)
tree113ae8c72e94af9ec4c5030cd1e823241109587f /fs
parentf2fs: fix to avoid panic in f2fs_inplace_write_data() (diff)
downloadlinux-cd23ffa9fcba071c6a6129c46bf41acca77fab4a.tar.xz
linux-cd23ffa9fcba071c6a6129c46bf41acca77fab4a.zip
f2fs: fix to set FI_UPDATE_WRITE correctly
This patch fixes to set FI_UPDATE_WRITE only if in-place IO was issued. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index da932eeecf30..7a67d6161b84 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1875,9 +1875,10 @@ got_it:
true);
if (PageWriteback(page))
end_page_writeback(page);
+ } else {
+ set_inode_flag(inode, FI_UPDATE_WRITE);
}
trace_f2fs_do_write_data_page(fio->page, IPU);
- set_inode_flag(inode, FI_UPDATE_WRITE);
return err;
}