bcachefs: fsck: Work around transaction restarts
authorKent Overstreet <kent.overstreet@gmail.com>
Wed, 6 Apr 2022 18:35:10 +0000 (14:35 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:30 +0000 (17:09 -0400)
commit292dea86dfc974e96a4b4972f4268611c2470d28
tree4d5a26fa8104f62d3ad9c22a9ebe7c69d944e7f6
parent275c8426fb8fd475e9991b3aa1b20f66069e594f
bcachefs: fsck: Work around transaction restarts

In check_extents() and check_dirents(), we're working towards only
handling transaction restarts in one place, at the top level - but we're
not there yet. check_i_sectors() and check_subdir_count() handle
transaction restarts locally, which means the iterator for the
dirent/extent is left unlocked (should_be_locked == 0), leading to
asserts popping when we go to do updates.

This patch hacks around this for now, until we can delete the offending
code.

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