bcachefs: Fix a btree iter usage error
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 29 Nov 2018 08:24:06 +0000 (03:24 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:12 +0000 (17:08 -0400)
commit01a0108f0139a2f6dbace54dd5d592d2d76415c1
treefe200e5b3d2fa57ccf9cf338766ffb0873870d2a
parent5b8a9227f8a4acd9652d6d89a608fbf4c39c6f44
bcachefs: Fix a btree iter usage error

previously, if the code traversed to the next btree node, that could
return an error (due to lock restarts) - which was not being checked
for.

fix is to rework it so it never iterates past the current leaf node, and
pops an assertion if it ever sees an error.

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