diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-03 18:00:48 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-05 10:44:08 -0400 |
commit | 319fef29e96524966bb8593117ce0c5867846eea (patch) | |
tree | 545a28a7713d985667637428692389724be91bc4 /fs/bcachefs/move.c | |
parent | fdccb24352e589bb59c9ba90f23c4e0994b90518 (diff) |
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/move.c')
-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); |