mirror of
https://github.com/torvalds/linux
synced 2024-10-15 07:47:34 +00:00
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>
This commit is contained in:
parent
fdccb24352
commit
319fef29e9
|
@ -547,6 +547,7 @@ static int bch2_move_data_btree(struct moving_context *ctxt,
|
||||||
ctxt->stats->pos = BBPOS(btree_id, start);
|
ctxt->stats->pos = BBPOS(btree_id, start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bch2_trans_begin(trans);
|
||||||
bch2_trans_iter_init(trans, &iter, btree_id, start,
|
bch2_trans_iter_init(trans, &iter, btree_id, start,
|
||||||
BTREE_ITER_prefetch|
|
BTREE_ITER_prefetch|
|
||||||
BTREE_ITER_all_snapshots);
|
BTREE_ITER_all_snapshots);
|
||||||
|
|
Loading…
Reference in a new issue