bcachefs: Another should_be_locked fixup
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 16 Aug 2022 07:08:15 +0000 (03:08 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:38 +0000 (17:09 -0400)
commit8192f8a58626ca3903a20f942ce86a6beb959a71
treea30809776d81ee6ede1154fc81a33e9d43169c94
parentd0b50524f1d9b60318b92830546b45cd3325cfe2
bcachefs: Another should_be_locked fixup

When returning a key from the key cache, in BTREE_ITER_WITH_KEY_CACHE
mode, we don't want to set should_be_locked on iter->path; we're not
returning a key from that path, so we donn't need to, and also since we
traversed the key cache iterator before setting should_be_locked on that
path it might be unlocked (if we unlocked, bch2_trans_relock() won't
have relocked it).

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