Bladeren bron

f2fs: remove unneeded check code with option in f2fs_remount

Because we have checked the contrary condition in case of "if" judgment, we do
not need to check the condition again in case of "else" judgment. Let's remove
it.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Chao Yu 11 jaren geleden
bovenliggende
commit
aba291b3d8
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      fs/f2fs/super.c

+ 2 - 2
fs/f2fs/super.c

@@ -669,7 +669,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 			f2fs_sync_fs(sb, 1);
 			f2fs_sync_fs(sb, 1);
 			need_restart_gc = true;
 			need_restart_gc = true;
 		}
 		}
-	} else if (test_opt(sbi, BG_GC) && !sbi->gc_thread) {
+	} else if (!sbi->gc_thread) {
 		err = start_gc_thread(sbi);
 		err = start_gc_thread(sbi);
 		if (err)
 		if (err)
 			goto restore_opts;
 			goto restore_opts;
@@ -682,7 +682,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 	 */
 	 */
 	if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) {
 	if ((*flags & MS_RDONLY) || !test_opt(sbi, FLUSH_MERGE)) {
 		destroy_flush_cmd_control(sbi);
 		destroy_flush_cmd_control(sbi);
-	} else if (test_opt(sbi, FLUSH_MERGE) && !SM_I(sbi)->cmd_control_info) {
+	} else if (!SM_I(sbi)->cmd_control_info) {
 		err = create_flush_cmd_control(sbi);
 		err = create_flush_cmd_control(sbi);
 		if (err)
 		if (err)
 			goto restore_gc;
 			goto restore_gc;