f2fs: avoid redundant f2fs_flush after remount
authorYunlong Song <yunlong.song@huawei.com>
Sat, 24 Jun 2017 07:57:19 +0000 (15:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 7 Jul 2017 17:34:41 +0000 (10:34 -0700)
create_flush_cmd_control will create redundant issue_flush_thread after each
remount with flush_merge option.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index 86a0c1095939c5fe841d367d4a2aa9f9ff83cbe8..7637033ef87b876ce73180d8b048388921d9757e 100644 (file)
@@ -555,6 +555,8 @@ int create_flush_cmd_control(struct f2fs_sb_info *sbi)
 
        if (SM_I(sbi)->fcc_info) {
                fcc = SM_I(sbi)->fcc_info;
+               if (fcc->f2fs_issue_flush)
+                       return err;
                goto init_thread;
        }