bcachefs: Fix failure to allocate btree node in cache
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 18 Feb 2022 05:47:45 +0000 (00:47 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commit8f9ad91a02c4fd1391ce852cadd9a0227fdd624a
tree179397fe5647fc5ea9ada7c5db34809e5e8be433
parentbf7e49a4ae564108d08d314e514a6f802748d73b
bcachefs: Fix failure to allocate btree node in cache

The error code when we fail to allocate a node in the btree node cache
doesn't make it to bch2_btree_path_traverse_all(). Instead, we need to
stash a flag in btree_trans so we know we have to take the cannibalize
lock.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_iter.c
fs/bcachefs/btree_types.h
fs/bcachefs/trace.h