diff options
| author | Changman Lee <cm224.lee@samsung.com> | 2013-02-03 20:05:09 -0500 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-02-11 17:15:02 -0500 |
| commit | 48600e44c18e4eb0f7c02ec8633c4c56aef292f0 (patch) | |
| tree | 5c2f6d487ad6f7052977fa15150786cd98245627 | |
| parent | 94787d91cba7ba168b028703b50a0224702ace9c (diff) | |
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 <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>
| -rw-r--r-- | fs/f2fs/gc.c | 7 |
1 files changed, 2 insertions, 5 deletions
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) | |||
| 49 | continue; | 49 | continue; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | f2fs_balance_fs(sbi); | ||
| 53 | |||
| 54 | if (!test_opt(sbi, BG_GC)) | ||
| 55 | continue; | ||
| 56 | |||
| 57 | /* | 52 | /* |
| 58 | * [GC triggering condition] | 53 | * [GC triggering condition] |
| 59 | * 0. GC is not conducted currently. | 54 | * 0. GC is not conducted currently. |
| @@ -96,6 +91,8 @@ int start_gc_thread(struct f2fs_sb_info *sbi) | |||
| 96 | { | 91 | { |
| 97 | struct f2fs_gc_kthread *gc_th; | 92 | struct f2fs_gc_kthread *gc_th; |
| 98 | 93 | ||
| 94 | if (!test_opt(sbi, BG_GC)) | ||
| 95 | return 0; | ||
| 99 | gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); | 96 | gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); |
| 100 | if (!gc_th) | 97 | if (!gc_th) |
| 101 | return -ENOMEM; | 98 | return -ENOMEM; |
