Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 319fef2

Browse files
author
Kent Overstreet
committed
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>
1 parent fdccb24 commit 319fef2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/bcachefs/move.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ static int bch2_move_data_btree(struct moving_context *ctxt,
547547
ctxt->stats->pos = BBPOS(btree_id, start);
548548
}
549549

550+
bch2_trans_begin(trans);
550551
bch2_trans_iter_init(trans, &iter, btree_id, start,
551552
BTREE_ITER_prefetch|
552553
BTREE_ITER_all_snapshots);

0 commit comments

Comments
 (0)