bcachefs: Fix a rare path in bch2_btree_path_peek_slot()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 12 Oct 2022 11:58:50 +0000 (07:58 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:43 +0000 (17:09 -0400)
commitf42238b5cde2f1624b2be5f64c813e6127a8012a
tree152de0d106668370adc95e5ec577d27a38c06a8d
parent7dcbdbd85cc3af14c0b9b5b80eb87cca8a322285
bcachefs: Fix a rare path in bch2_btree_path_peek_slot()

In the drop_alloc tests, we may end up calling
bch2_btree_iter_peek_slot() on an interior level that doesn't exist.
Previously, this would hit the path->uptodate assertion in
bch2_btree_path_peek_slot(); this path first checks a NULL btree node,
which is how we know we're at the end of the btree.

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