diff options
author | Chao Yu <yuchao0@huawei.com> | 2017-09-29 13:59:36 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-10-10 12:49:53 -0700 |
commit | 3f06252f7aa5862591ee37fab63c4e95803880b6 (patch) | |
tree | e9016a410685189713d412279ba5decc55741599 /fs/f2fs/file.c | |
parent | 9a4ffdf55811ff3382cdf44459ec17521bd47e5e (diff) | |
download | linux-stable-3f06252f7aa5862591ee37fab63c4e95803880b6.tar.gz linux-stable-3f06252f7aa5862591ee37fab63c4e95803880b6.tar.bz2 linux-stable-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/f2fs/file.c')
-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); |