Skip to content

Commit

Permalink
bcachefs: Fix trans->locked assert
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kent Overstreet committed Jun 5, 2024
1 parent fdccb24 commit 319fef2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/bcachefs/move.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 319fef2

Please sign in to comment.