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

Yingjie Gao posted 2 patches 1 week, 5 days ago
fs/xfs/scrub/cow_repair.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
[PATCH v3 0/2] xfs: fix CoW fork repair error handling
Posted by Yingjie Gao 1 week, 5 days ago
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@uniontech.com/

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@uniontech.com/

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
Re: [PATCH v3 0/2] xfs: fix CoW fork repair error handling
Posted by Carlos Maiolino 1 week, 2 days ago
On Wed, 27 May 2026 12:31:32 +0800, Yingjie Gao wrote:
> 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.
> 
> [...]

Applied to for-next, thanks!

[1/2] xfs: fix error returns in CoW fork repair
      commit: fcf4faba9f986b3bb528da11913c9ec5d6e8f689
[2/2] xfs: fix rtgroup cleanup in CoW fork repair
      commit: c3e073894379532c00cca7ba5762e18fafe29da8

Best regards,
-- 
Carlos Maiolino <cem@kernel.org>