bcachefs: Fix incorrect use of bch2_extent_atomic_end()
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 7 Oct 2019 19:09:30 +0000 (15:09 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:28 +0000 (17:08 -0400)
commita40d97a771387362dd272608ed2df0a1fd39343e
tree168e3117e596f5fb8698d8e3bcac6229455b4344
parent63fbf458cb7d7df6b58f982df7496f79ee9e6863
bcachefs: Fix incorrect use of bch2_extent_atomic_end()

bch2_extent_atomic_end counts the number of iterators requried for
marking overwrites - but journal replay never marks overwrites, so that
part was incorrect. And counting iterators for the key being inserted
should be unnecessary because we did that prior to the key being
inserted before it was first journalled.

This should fix an iterator overflow bug - the iterators for walking
overwrites were totally unneeded.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/recovery.c