bcachefs: Fix upgrade_readers()
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 3 Nov 2021 16:08:02 +0000 (12:08 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:15 +0000 (17:09 -0400)
commitf527afea5a2f3c2645080584dafeb6cc5314b652
treee3efcef9f65c35e6016631e08327bc29678fd9d1
parentd7407292723ea79028afe6729432602ced243972
bcachefs: Fix upgrade_readers()

The bch2_btree_path_upgrade() call was failing and tripping an assert -
path->level + 1 is in this case not necessarily exactly what we want,
fix it by upgrading exactly the locks we want.

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