Commit 6d758368 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix a btree transaction iter overflow

extent_replay_key dates from before putting iterators was required -
fixed.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 101d4713
......@@ -456,6 +456,7 @@ static int bch2_extent_replay_key(struct bch_fs *c, enum btree_id btree_id,
__bch2_btree_iter_set_pos(split_iter, split->k.p, false);
bch2_trans_update(&trans, split_iter, split,
BTREE_TRIGGER_NORUN);
bch2_trans_iter_put(&trans, split_iter);
bch2_btree_iter_set_pos(iter, split->k.p);
......@@ -481,6 +482,8 @@ static int bch2_extent_replay_key(struct bch_fs *c, enum btree_id btree_id,
BTREE_INSERT_LAZY_RW|
BTREE_INSERT_JOURNAL_REPLAY);
err:
bch2_trans_iter_put(&trans, iter);
if (ret == -EINTR)
goto retry;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment