bcachefs: Don't set btree_path to updtodate if we don't fill

This fixes various locking asserts, and a null ptr deref in
bch2_btree_iter_peek_path().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-12-31 12:58:23 -05:00
parent cf67f46641
commit bd5b09727f

View file

@ -291,10 +291,8 @@ static noinline int btree_key_cache_fill(struct btree_trans *trans,
struct btree_path *ck_path,
unsigned flags)
{
if (flags & BTREE_ITER_cached_nofill) {
ck_path->uptodate = BTREE_ITER_UPTODATE;
if (flags & BTREE_ITER_cached_nofill)
return 0;
}
struct bch_fs *c = trans->c;
struct btree_iter iter;