Skip to content

Commit

Permalink
f2fs: remove unnecessary gc option check and balance_fs
Browse files Browse the repository at this point in the history
 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 <cm224.lee@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
  • Loading branch information
Changman Lee authored and Jaegeuk Kim committed Feb 11, 2013
1 parent 94787d9 commit 48600e4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/f2fs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 48600e4

Please sign in to comment.