From 6d758368f1265ca9d0b7a077caf1ca9e9859c8c8 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 13 Nov 2020 18:30:53 -0500 Subject: [PATCH] bcachefs: Fix a btree transaction iter overflow extent_replay_key dates from before putting iterators was required - fixed. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/recovery.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.50.1