From: Chao Yu Date: Fri, 29 Sep 2017 05:59:36 +0000 (+0800) Subject: f2fs: drop FI_UPDATE_WRITE tag after f2fs_issue_flush X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a815ce9938f4caee132d8fb4f62a119ea08601b5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index b8372095ba0a..0a1f033b50c2 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);