public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: fix returned valued from xfs_defer_can_append
Date: Wed, 4 Mar 2026 11:51:05 -0800	[thread overview]
Message-ID: <20260304195105.GZ57948@frogsfrogsfrogs> (raw)
In-Reply-To: <20260304185441.449664-1-cem@kernel.org>

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
> 
> 

  reply	other threads:[~2026-03-04 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 18:54 [PATCH] xfs: fix returned valued from xfs_defer_can_append cem
2026-03-04 19:51 ` Darrick J. Wong [this message]
2026-03-05  7:31   ` Joarder, Souptick
2026-03-05  9:46 ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260304195105.GZ57948@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox