diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 6066c6eecf41..ef7b4b0ed164 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -207,10 +207,10 @@ void f2fs_stop_gc_thread(struct f2fs_sb_info *sbi) if (!gc_th) return; + sbi->gc_thread = NULL; kthread_stop(gc_th->f2fs_gc_task); wake_up_all(&gc_th->fggc_wq); kfree(gc_th); - sbi->gc_thread = NULL; } static int select_gc_type(struct f2fs_sb_info *sbi, int gc_type)