summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-09-29 07:59:36 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2017-10-10 21:49:53 +0200
commit3f06252f7aa5862591ee37fab63c4e95803880b6 (patch)
treee9016a410685189713d412279ba5decc55741599 /fs
parentf2fs: obsolete ALLOC_NID_LIST list (diff)
downloadlinux-3f06252f7aa5862591ee37fab63c4e95803880b6.tar.xz
linux-3f06252f7aa5862591ee37fab63c4e95803880b6.zip
f2fs: drop FI_UPDATE_WRITE tag after f2fs_issue_flush
If we failed to issue flush in ->fsync, we need to keep FI_UPDATE_WRITE flag to make sure triggering flush in next ->fsync. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/file.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 517e112c8a9a..78fff137a914 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -294,10 +294,12 @@ sync_nodes:
remove_ino_entry(sbi, ino, APPEND_INO);
clear_inode_flag(inode, FI_APPEND_WRITE);
flush_out:
- remove_ino_entry(sbi, ino, UPDATE_INO);
- clear_inode_flag(inode, FI_UPDATE_WRITE);
if (!atomic)
ret = f2fs_issue_flush(sbi);
+ if (!ret) {
+ remove_ino_entry(sbi, ino, UPDATE_INO);
+ clear_inode_flag(inode, FI_UPDATE_WRITE);
+ }
f2fs_update_time(sbi, REQ_TIME);
out:
trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret);