diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-11-17 22:16:01 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-20 01:49:30 -0500 |
commit | 6c0299320318c8154a20a3d9e73cbd1fc58d96e1 (patch) | |
tree | a217e4dfdd816c8d8953f8cd3f0495e3ab045131 /fs/f2fs/gc.c | |
parent | 8cdcb71322ec21aaee90117b0c01d576851a8faa (diff) |
f2fs: avoid unable to restart gc thread in remount
In f2fs_remount, we will stop gc thread and set need_restart_gc as true when new
option is set without BG_GC, then if any error occurred in the following
procedure, we can restore to start the gc thread.
But after that, We will fail to restore gc thread in start_gc_thread as BG_GC is
not set in new option, so we'd better move this condition judgment out of
start_gc_thread to fix this issue.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index b197a2f2993a..657683c9ee48 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -96,8 +96,6 @@ int start_gc_thread(struct f2fs_sb_info *sbi) | |||
96 | dev_t dev = sbi->sb->s_bdev->bd_dev; | 96 | dev_t dev = sbi->sb->s_bdev->bd_dev; |
97 | int err = 0; | 97 | int err = 0; |
98 | 98 | ||
99 | if (!test_opt(sbi, BG_GC)) | ||
100 | goto out; | ||
101 | gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); | 99 | gc_th = kmalloc(sizeof(struct f2fs_gc_kthread), GFP_KERNEL); |
102 | if (!gc_th) { | 100 | if (!gc_th) { |
103 | err = -ENOMEM; | 101 | err = -ENOMEM; |