diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-09-29 07:59:36 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-10-10 21:49:53 +0200 |
commit | 3f06252f7aa5862591ee37fab63c4e95803880b6 (patch) | |
tree | e9016a410685189713d412279ba5decc55741599 /fs | |
parent | f2fs: obsolete ALLOC_NID_LIST list (diff) | |
download | linux-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.c | 6 |
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); |