bcachefs: Fix bch2_btree_trans_to_text()
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 5 Aug 2022 15:36:13 +0000 (11:36 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:37 +0000 (17:09 -0400)
commit86b74451931790eafa018021fe900faea3230189
treeff63bc31d99a692256ba8a023828168c87b79a0e
parentae33e7a274abe6863bc4a1f4ea1e4c5f65b533f9
bcachefs: Fix bch2_btree_trans_to_text()

bch2_btree_trans_to_text() is used to print btree_transactions owned by
other threads; thus, it needs to be particularly careful. This fixes a
null ptr deref caused by racing with the owning thread changing
path->l[].b.

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