summaryrefslogtreecommitdiff
path: root/fs/bcachefs/movinggc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-28 16:33:52 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-11-28 22:58:23 -0500
commit415e5107b0dce0e5407ae4a46700cd7e8859e252 (patch)
treedde5d17cfa9d1f5acdc92c1879cfa29317b7dc35 /fs/bcachefs/movinggc.c
parent463086d99889c84ce0960fac2815c596f26cc0e5 (diff)
bcachefs: Extra kthread_should_stop() calls for copygcbcachefs-2023-11-29
This fixes a bug where going read-only was taking longer than it should have due to copygc forgetting to check kthread_should_stop() Additionally: fix a missing is_kthread check in bch2_move_ratelimit(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/movinggc.c')
-rw-r--r--fs/bcachefs/movinggc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index 0a0576326c5b..a84e79f79e5e 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -207,7 +207,7 @@ static int bch2_copygc(struct moving_context *ctxt,
goto err;
darray_for_each(buckets, i) {
- if (unlikely(freezing(current)))
+ if (kthread_should_stop() || freezing(current))
break;
f = move_bucket_in_flight_add(buckets_in_flight, *i);