bcachefs: copygc should wakeup on shutdown if disabled

Signed-off-by: Daniel Hill <daniel@gluo.nz>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Daniel Hill 2023-11-28 19:24:47 +13:00 committed by Kent Overstreet
parent 0c069781dd
commit 3ec3758a81

View File

@ -337,7 +337,8 @@ static int bch2_copygc_thread(void *arg)
if (!c->copy_gc_enabled) { if (!c->copy_gc_enabled) {
move_buckets_wait(&ctxt, buckets, true); move_buckets_wait(&ctxt, buckets, true);
kthread_wait_freezable(c->copy_gc_enabled); kthread_wait_freezable(c->copy_gc_enabled ||
kthread_should_stop());
} }
if (unlikely(freezing(current))) { if (unlikely(freezing(current))) {