bcachefs: path->should_be_locked fixes
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 7 Nov 2021 15:19:37 +0000 (10:19 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:16 +0000 (17:09 -0400)
commit9a74f63c97a5c8fcfd0469a87afb0aa95f55f806
tree8a7bc8f5592ae9ce27bb12c368a4a6ccadb27dbb
parente2b605601ad56904c700569a11fc73db7ecc7acd
bcachefs: path->should_be_locked fixes

 - We should only be clearing should_be_locked in btree_path_set_pos() -
   it's the responsiblity of the btree_path code, not the btree_iter
   code.

 - bch2_path_put() needs to pay attention to path->should_be_locked, to
   ensure we don't drop locks we're supposed to be keeping.

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