bcachefs: Fix __bch2_btree_node_lock
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 16 Feb 2022 03:01:33 +0000 (22:01 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commit7abda8c1d8af41266e543160bb3290dea963fdd0
treed40253df03a0c0cba97d9fdbd643e62f2c2bf641
parentc7ce27328ba133d6cce76a4df7667088009d4543
bcachefs: Fix __bch2_btree_node_lock

__bch2_btree_node_lock() was implementing the wrong lock ordering for
cached vs. non cached paths - this fixes it to match the btree path sort
order as defined by __btree_path_cmp(), and also simplifies the code
some.

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