diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-09-29 13:59:36 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-12-06 16:40:33 +0100 |
| commit | 1bc837fb5251ed3d92f1fc4cfc67cb3b962d4a9e (patch) | |
| tree | 6f642381a8baef26625626dc23e8288f6784518d /fs/f2fs/file.c | |
| parent | 850c0856f4d7c031c9b8a92866e4d455e3f1d9c4 (diff) | |
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 ff52545c6..287640adb 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -296,10 +296,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); |
