diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-04 00:00:48 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-05 16:44:08 +0200 |
commit | 319fef29e96524966bb8593117ce0c5867846eea (patch) | |
tree | 545a28a7713d985667637428692389724be91bc4 /fs/bcachefs | |
parent | bcachefs: Rereplicate now moves data off of durability=0 devices (diff) | |
download | linux-319fef29e96524966bb8593117ce0c5867846eea.tar.xz linux-319fef29e96524966bb8593117ce0c5867846eea.zip |
bcachefs: Fix trans->locked assert
in bch2_move_data_btree, we might start with the trans unlocked from a
previous loop iteration - we need a trans_begin() before iter_init().
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/move.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c index 2706d8242345..6e477fadaa2a 100644 --- a/fs/bcachefs/move.c +++ b/fs/bcachefs/move.c @@ -547,6 +547,7 @@ static int bch2_move_data_btree(struct moving_context *ctxt, ctxt->stats->pos = BBPOS(btree_id, start); } + bch2_trans_begin(trans); bch2_trans_iter_init(trans, &iter, btree_id, start, BTREE_ITER_prefetch| BTREE_ITER_all_snapshots); |