Commit 319fef29 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fdccb243
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);