[PATCH v3 0/2] xfs: fix CoW fork repair error handling
From: Yingjie Gao
Date: Wed May 27 2026 - 00:32:20 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 v2:
- Drop the braces around the single-statement force-rebuild if bodies
in both patches.
v2:
https://lore.kernel.org/linux-xfs/20260527033902.1524007-1-gaoyingjie@xxxxxxxxxxxxx/
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 | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
--
2.20.1