Skip to contentSkip to conversation

xfs: Fix the return value of xfs_rtcopy_summary()

PATCH Superseded Nirjhar Roy (IBM) 2 participants 3 messages Dec 17, 2025 XFS filesystem

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xfs: Fix the return value of xfs_rtcopy_summary()

xfs_rtcopy_summary() should return the appropriate error code instead of always returning 0. The caller of this function which is xfs_growfs_rt_bmblock() is already handling the error.

Fixes e94b53ff699c ("xfs: cache last bitmap block in realtime allocator")
---
 fs/xfs/xfs_rtalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_rtalloc.c +1 -1
index 6907e871fa15..bc88b965e909 100644
@@ -126,7 +126,7 @@ xfs_rtcopy_summary(
 	error = 0;
 out:
 	xfs_rtbuf_cache_relse(oargs);
-	return 0;
+	return error;
 }
 /*
  * Mark an extent specified by start and len allocated.
Signature · 1 line
2.43.5
#1 lore raw
Quoted 4 lines · Nirjhar Roy (IBM)

xfs_rtcopy_summary() should return the appropriate error code instead of always returning 0. The caller of this function which is xfs_growfs_rt_bmblock() is already handling the error.

Please add
Cc: <[email protected]> # v6.7

so this can be autobackported

--D

Quoted 24 lines
Fixes e94b53ff699c ("xfs: cache last bitmap block in realtime allocator")
---
 fs/xfs/xfs_rtalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_rtalloc.c +1 -1
index 6907e871fa15..bc88b965e909 100644
@@ -126,7 +126,7 @@ xfs_rtcopy_summary(
 	error = 0;
 out:
 	xfs_rtbuf_cache_relse(oargs);
-	return 0;
+	return error;
 }
 /*
  * Mark an extent specified by start and len allocated.
Signature · 1 line
2.43.5
#2 lore raw
Quoted 9 lines · Darrick J. Wong
Quoted 4 lines · Nirjhar Roy (IBM)

xfs_rtcopy_summary() should return the appropriate error code instead of always returning 0. The caller of this function which is xfs_growfs_rt_bmblock() is already handling the error.

Please add
Cc: <[email protected]> # v6.7

so this can be autobackported

Okay, thank you. Resent it with the Cc tag.

--NR

Quoted 27 lines

--D

Quoted 24 lines
Fixes e94b53ff699c ("xfs: cache last bitmap block in realtime allocator")
---
  fs/xfs/xfs_rtalloc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_rtalloc.c +1 -1
index 6907e871fa15..bc88b965e909 100644
@@ -126,7 +126,7 @@ xfs_rtcopy_summary(
  	error = 0;
  out:
  	xfs_rtbuf_cache_relse(oargs);
-	return 0;
+	return error;
  }
  /*
   * Mark an extent specified by start and len allocated.
Signature · 1 line
2.43.5
Signature · 3 lines
Nirjhar Roy
Linux Kernel Developer
IBM, Bangalore