diff options
author | Daniel Hill <daniel@gluo.nz> | 2023-11-28 19:24:47 +1300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:39 -0500 |
commit | 3ec3758a814840619ceb3446a37501cfca29bdae (patch) | |
tree | 404a65fa25cdf9894975007bcd8f641c0a87c476 /fs/bcachefs/movinggc.c | |
parent | 0c069781ddfa4e31c169a8eced1ee90b8929d522 (diff) | |
download | linux-stable-3ec3758a814840619ceb3446a37501cfca29bdae.tar.gz linux-stable-3ec3758a814840619ceb3446a37501cfca29bdae.tar.bz2 linux-stable-3ec3758a814840619ceb3446a37501cfca29bdae.zip |
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.c | 3 |
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))) { |