[PATCH v2 0/2] xfs: fix CoW fork repair error handling

From: Yingjie Gao

Date: Tue May 26 2026 - 23:39:45 EST


Fix two error handling paths in CoW fork repair.

Patch 1 makes xrep_cow_find_bad() return saved errors after cleanup.
It also lets a force-rebuild bitmap error fall through to the cleanup
labels instead of returning directly.

Patch 2 applies the same fall-through pattern to the realtime helper
so that scrub rtgroup state is released before returning.

Changes since v1:
- Let the force-rebuild error paths fall through instead of adding
gotos, as Carlos pointed out.

v1:
https://lore.kernel.org/linux-xfs/20260526123243.1078867-1-gaoyingjie@xxxxxxxxxxxxx/

Yingjie Gao (2):
xfs: fix error returns in CoW fork repair
xfs: fix rtgroup cleanup in CoW fork repair

fs/xfs/scrub/cow_repair.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

--
2.20.1