bcachefs: Fix __btree_path_traverse_all
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 16 Feb 2022 08:13:36 +0000 (03:13 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:24 +0000 (17:09 -0400)
commit33aa419db96077993af90eddb49adac1270a96e0
tree7b9c770565f3b415332ae039ed3b4b3e3f8ce66f
parent4b59a319ad29815aa8f629513df2c291c2108bf9
bcachefs: Fix __btree_path_traverse_all

The loop that traverses paths in traverse_all() needs to be a little bit
tricky, because traversing a path can cause other paths to be added (or
perhaps removed) at about the same position.

The old logic was buggy, replace it with simpler logic.

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