xfs: fix returned valued from xfs_defer_can_append
[email protected]
maintainerPATCH 1/1 xfs: fix returned valued from xfs_defer_can_append
From: Carlos Maiolino <[email protected]>
xfs_defer_can_append returns a bool, it shouldn't be returning a NULL.
Found by code inspection.
--- fs/xfs/libxfs/xfs_defer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_defer.c +1 -1
@@ -809,7 +809,7 @@ xfs_defer_can_append(/* Paused items cannot absorb more work */ if (dfp->dfp_flags &XFS_DEFER_PAUSED ) -return NULL ; +return false;/* Already full? */ if (ops->max_items && dfp->dfp_count >= ops->max_items)
Signature · 1 line
2.53.0
Quoted 10 lines · On Wed, Mar 04, 2026 at 07:54:27PM +0100, [email protected] wrote:
From: Carlos Maiolino <[email protected]>
xfs_defer_can_appendreturns a bool, it shouldn't be returning a NULL.Found by code inspection.
Fixes 4dffb2cbb483 ("xfs: allow pausing of pending deferred work items")Signed-off-by Carlos Maiolino <[email protected]>Signed-off-by Carlos Maiolino <[email protected]>
Yep, that's a bug. Fortunately a benign one.
--D
Quoted 21 lines
--- fs/xfs/libxfs/xfs_defer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_defer.c +1
-1@@ -809,7 +809,7 @@ xfs_defer_can_append(/* Paused items cannot absorb more work */ if (dfp->dfp_flags &XFS_DEFER_PAUSED ) -return NULL ; +return false;/* Already full? */ if (ops->max_items && dfp->dfp_count >= ops->max_items)Signature · 1 line
2.53.0
-----Original Message-----
From: Darrick J. Wong <[email protected]>
Sent: Thursday, March 5, 2026 1:21 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH] xfs: fix returned valued from xfs_defer_can_append
Quoted 10 lines · On Wed, Mar 04, 2026 at 07:54:27PM +0100, [email protected] wrote:
From: Carlos Maiolino <[email protected]>
xfs_defer_can_appendreturns a bool, it shouldn't be returning a NULL.Found by code inspection.
Fixes 4dffb2cbb483 ("xfs: allow pausing of pending deferred workitems")
Signed-off-by Carlos Maiolino <[email protected]>Signed-off-by Carlos Maiolino <[email protected]>
Yep, that's a bug. Fortunately a benign one.
--D
Quoted 21 lines
--- fs/xfs/libxfs/xfs_defer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/xfs/libxfs/xfs_defer.c +1
-2@@ -809,7 +809,7 @@ xfs_defer_can_append(/* Paused items cannot absorb more work */ if (dfp->dfp_flags &XFS_DEFER_PAUSED ) -return NULL ; +return false;/* Already full? */ if (ops->max_items && dfp->dfp_count >= ops->max_items) --2.53.0
Quoted 6 lines · On Wed, 04 Mar 2026 19:54:27 +0100, [email protected] wrote:
xfs_defer_can_appendreturns a bool, it shouldn't be returning a NULL.Found by code inspection.
Applied to for-next, thanks!
[1/1] xfs: fix returned valued from xfs_defer_can_append
commit: 625f2cf0ed12953313970a80c7d501e9150251a9
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>