public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: fix returned valued from xfs_defer_can_append
@ 2026-03-04 18:54 cem
  2026-03-04 19:51 ` Darrick J. Wong
  2026-03-05  9:46 ` Carlos Maiolino
  0 siblings, 2 replies; 4+ messages in thread
From: cem @ 2026-03-04 18:54 UTC (permalink / raw)
  To: linux-xfs; +Cc: cem, djwong

From: Carlos Maiolino <cem@kernel.org>

xfs_defer_can_append returns 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 <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
---
 fs/xfs/libxfs/xfs_defer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
index 472c261163ed..c6909716b041 100644
--- a/fs/xfs/libxfs/xfs_defer.c
+++ b/fs/xfs/libxfs/xfs_defer.c
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: fix returned valued from xfs_defer_can_append
  2026-03-04 18:54 [PATCH] xfs: fix returned valued from xfs_defer_can_append cem
@ 2026-03-04 19:51 ` Darrick J. Wong
  2026-03-05  7:31   ` Joarder, Souptick
  2026-03-05  9:46 ` Carlos Maiolino
  1 sibling, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2026-03-04 19:51 UTC (permalink / raw)
  To: cem; +Cc: linux-xfs

On Wed, Mar 04, 2026 at 07:54:27PM +0100, cem@kernel.org wrote:
> From: Carlos Maiolino <cem@kernel.org>
> 
> xfs_defer_can_append returns 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 <cmaiolino@redhat.com>
> Signed-off-by: Carlos Maiolino <cem@kernel.org>

Yep, that's a bug.  Fortunately a benign one.

Cc: <stable@vger.kernel.org> # v6.8
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  fs/xfs/libxfs/xfs_defer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
> index 472c261163ed..c6909716b041 100644
> --- a/fs/xfs/libxfs/xfs_defer.c
> +++ b/fs/xfs/libxfs/xfs_defer.c
> @@ -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
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] xfs: fix returned valued from xfs_defer_can_append
  2026-03-04 19:51 ` Darrick J. Wong
@ 2026-03-05  7:31   ` Joarder, Souptick
  0 siblings, 0 replies; 4+ messages in thread
From: Joarder, Souptick @ 2026-03-05  7:31 UTC (permalink / raw)
  To: Darrick J. Wong, cem@kernel.org; +Cc: linux-xfs@vger.kernel.org



-----Original Message-----
From: Darrick J. Wong <djwong@kernel.org> 
Sent: Thursday, March 5, 2026 1:21 AM
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix returned valued from xfs_defer_can_append

On Wed, Mar 04, 2026 at 07:54:27PM +0100, cem@kernel.org wrote:
> From: Carlos Maiolino <cem@kernel.org>
> 
> xfs_defer_can_append returns 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 <cmaiolino@redhat.com>
> Signed-off-by: Carlos Maiolino <cem@kernel.org>

Yep, that's a bug.  Fortunately a benign one.

Cc: <stable@vger.kernel.org> # v6.8
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

Acked-by: Souptick Joarder <souptick.joarder@hpe.com>

--D

> ---
>  fs/xfs/libxfs/xfs_defer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c 
> index 472c261163ed..c6909716b041 100644
> --- a/fs/xfs/libxfs/xfs_defer.c
> +++ b/fs/xfs/libxfs/xfs_defer.c
> @@ -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
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: fix returned valued from xfs_defer_can_append
  2026-03-04 18:54 [PATCH] xfs: fix returned valued from xfs_defer_can_append cem
  2026-03-04 19:51 ` Darrick J. Wong
@ 2026-03-05  9:46 ` Carlos Maiolino
  1 sibling, 0 replies; 4+ messages in thread
From: Carlos Maiolino @ 2026-03-05  9:46 UTC (permalink / raw)
  To: linux-xfs, cem; +Cc: djwong

On Wed, 04 Mar 2026 19:54:27 +0100, cem@kernel.org wrote:
> xfs_defer_can_append returns 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,
-- 
Carlos Maiolino <cem@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-05  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 18:54 [PATCH] xfs: fix returned valued from xfs_defer_can_append cem
2026-03-04 19:51 ` Darrick J. Wong
2026-03-05  7:31   ` Joarder, Souptick
2026-03-05  9:46 ` Carlos Maiolino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox