summaryrefslogtreecommitdiff
path: root/fs/bcachefs/movinggc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-14 11:48:07 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:57 -0400
commitc639c29ce6882f4f77a81d778ef4741d5a5979d9 (patch)
treee0e19f11a44743dbdf6427c6c78759d8ced52cda /fs/bcachefs/movinggc.c
parent2d004446c8044e1660adc53e55d151c607a472d6 (diff)
bcachefs: Fix an assert in copygc thread shutdown path
We're not supposed to have nested (locked) btree_trans on the stack: this means copygc shutdown needs to exit our btree_trans before exiting the move_ctxt, which calls bch2_write(). 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 4d8d013fe4fc..4762594f6287 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -334,8 +334,8 @@ static int bch2_copygc_thread(void *arg)
wake_up(&c->copygc_running_wq);
}
- bch2_moving_ctxt_exit(&ctxt);
bch2_trans_exit(&trans);
+ bch2_moving_ctxt_exit(&ctxt);
free_fifo(&move_buckets);
return 0;