summaryrefslogtreecommitdiff
path: root/fs/bcachefs/movinggc.c
diff options
context:
space:
mode:
authorDaniel Hill <daniel@gluo.nz>2023-11-28 19:24:47 +1300
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:39 -0500
commit3ec3758a814840619ceb3446a37501cfca29bdae (patch)
tree404a65fa25cdf9894975007bcd8f641c0a87c476 /fs/bcachefs/movinggc.c
parent0c069781ddfa4e31c169a8eced1ee90b8929d522 (diff)
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>
Diffstat (limited to 'fs/bcachefs/movinggc.c')
-rw-r--r--fs/bcachefs/movinggc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index dcb163a68e47..7155e2060d29 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))) {