bcachefs: Fix fsck path for refink pointers
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 21 Oct 2021 19:48:05 +0000 (15:48 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:15 +0000 (17:09 -0400)
commit396a887d8fdf37d9e3e9a5b2db823184f8ec2eaa
treeb177d2ac8ba6f149c2d76413714ff9f647b6625a
parent23af498cc44bc7615f3f208f39daab637bcac023
bcachefs: Fix fsck path for refink pointers

The way __bch2_mark_reflink_p returns errors was clashing with returning
the number of sectors processed - we weren't returning FSCK_ERR_EXIT
correctly.

Fix this by only using the return code for errors, which actually ends
up simplifying the overall logic.

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