summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-14 02:30:53 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:47 +0300
commit6d758368f1265ca9d0b7a077caf1ca9e9859c8c8 (patch)
treec0489735c51ee705a89d017d7574e0f1818db48c
parent101d471367a4b3a9158c53d3ca0093b0bed60338 (diff)
downloadlinux-6d758368f1265ca9d0b7a077caf1ca9e9859c8c8.tar.xz
bcachefs: Fix a btree transaction iter overflow
extent_replay_key dates from before putting iterators was required - fixed. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/recovery.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 1745cfac6b26..6750063663b5 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -456,6 +456,7 @@ retry:
__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 @@ retry:
BTREE_INSERT_LAZY_RW|
BTREE_INSERT_JOURNAL_REPLAY);
err:
+ bch2_trans_iter_put(&trans, iter);
+
if (ret == -EINTR)
goto retry;