summaryrefslogtreecommitdiff
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-03-14 20:27:43 -0400
commit2612b925fc1a3f75d9c5ded77968182e8a7c58f1 (patch)
tree7a46bbda61804d662302b0c15d847b0e70f9ffb3
parentf31b20ee0a8e14a81d78c790793ebf2431cda9bb (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>
-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 d904a67e899b..178f96a64804 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;