bcachefs: More btree iterator fixes
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 7 Oct 2021 18:56:56 +0000 (14:56 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:13 +0000 (17:09 -0400)
commitd697b9abbae2f2c387aaa4e702afe12e31984a18
treea2f0f29eb3c6051d10c8128d92b968541a648fc5
parent502027a8b2c0f0d46daf948cd1315694a46294e3
bcachefs: More btree iterator fixes

 - check for getting to the end of the btree in bch2_path_verify_locks
   and __btree_path_traverse_all(), this fixes an infinite loop in
   __btree_path_traverse_all().
 - relax requirement in bch2_btree_node_upgrade() that we must want an
   intent lock, this fixes bugs with paths that point to interior nodes
   (nonzero level).
 - bch2_btree_node_update_key(): fix it to upgrade the path to an intent
   lock, if necessary

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