bcachefs: Clean up bch2_extent_can_insert
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 21 Jan 2021 00:42:09 +0000 (19:42 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:51 +0000 (17:08 -0400)
commitef470b4817e6592fdb22b566380d289d7c42a17d
tree4b064be802c2ac03e79538b8c10d5d4f766f7c8a
parenta5cd80ea99e544b67acde573fc2a2dd68659fd40
bcachefs: Clean up bch2_extent_can_insert

It was using an internal btree node iterator interface, when
bch2_btree_iter_peek_slot() sufficed. We were hitting a null ptr deref
that looked like it was from the iterator not being uptodate - this will
also fix that.

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