Commit bd5b0972 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent cf67f466
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;