bcachefs: Ensure bch2_btree_node_get() calls relock() after unlock()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 28 May 2023 06:35:34 +0000 (02:35 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
commite1d29c5fa1205c75dd96303f76d7aa4991555aaa
tree646b7b130460597769928e29509f16c3d8816e6d
parent70d41c9e276c5e7b130d328a6ece92c9130a6572
bcachefs: Ensure bch2_btree_node_get() calls relock() after unlock()

Fix a bug where bch2_btree_node_get() might call bch2_trans_unlock() (in
fill) without calling bch2_trans_relock(); this is a bug when it's done
in the core btree code.

Also, twea bch2_btree_node_mem_alloc() to drop btree locks before doing
a blocking memory allocation.

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