From: Changman Lee Date: Mon, 4 Feb 2013 01:05:09 +0000 (+0900) Subject: f2fs: remove unnecessary gc option check and balance_fs X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=48600e44c18e4eb0f7c02ec8633c4c56aef292f0;p=deliverable%2Flinux.git f2fs: remove unnecessary gc option check and balance_fs 1. If f2fs is mounted with background_gc_off option, checking BG_GC is not redundant. 2. f2fs_balance_fs is checked in f2fs_gc, so this is also redundant. Signed-off-by: Changman Lee Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 375e69e2c6f1..8d293cb685ba 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -49,11 +49,6 @@ static int gc_thread_func(void *data) continue; } - f2fs_balance_fs(sbi); - - if (!test_opt(sbi, BG_GC)) - continue; - /* * [GC triggering condition] * 0. GC is not conducted currently. @@ -96,6 +91,8 @@ int start_gc_thread(struct f2fs_sb_info *sbi) { struct f2fs_gc_kthread *gc_th; + if (!test_opt(sbi, BG_GC)) + return 0; gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); if (!gc_th) return -ENOMEM;