From: Daniel Hill Date: Tue, 28 Nov 2023 06:24:47 +0000 (+1300) Subject: bcachefs: copygc should wakeup on shutdown if disabled X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3ec3758a814840619ceb3446a37501cfca29bdae;p=linux.git bcachefs: copygc should wakeup on shutdown if disabled Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index dcb163a68e47b..7155e2060d29e 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -337,7 +337,8 @@ static int bch2_copygc_thread(void *arg) if (!c->copy_gc_enabled) { 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))) {