bcachefs: Fix set_should_be_locked() call in peek_slot()
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 14 May 2025 01:14:17 +0000 (21:14 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 14 May 2025 21:05:19 +0000 (17:05 -0400)
commit43b9fece2d9687cde58cc7eec4548dd1c35e2198
treec8ea21adbe8f1f194beba0af184e29419342a7bb
parent61198e62878477926c9e986eaf6bc40aafb0bf64
bcachefs: Fix set_should_be_locked() call in peek_slot()

set_should_be_locked() needs to be called before peek_key_cache(), which
traverses other paths and may do a trans unlock/relock.

This fixes an assertion pop in path_peek_slot(), when the path we're
using is unexpectedly not uptodate.

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