From: Carlos Maiolino <cem@kernel.org>
To: hongao <hongao@uniontech.com>
Cc: djwong@kernel.org, sandeen@redhat.com, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xfs: Remove redundant NULL check after __GFP_NOFAIL
Date: Wed, 4 Mar 2026 10:50:18 +0100 [thread overview]
Message-ID: <aagAOTTpcdRKUmBs@nidhogg.toxiclabs.cc> (raw)
In-Reply-To: <B6935AE39B8FFBF2+20260303033332.277641-1-hongao@uniontech.com>
On Tue, Mar 03, 2026 at 11:33:32AM +0800, hongao wrote:
> Remove redundant NULL check after kzalloc() with GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL.
>
> Signed-off-by: hongao <hongao@uniontech.com>
>
> diff --git a/fs/xfs/libxfs/xfs_da_btree.c b/fs/xfs/libxfs/xfs_da_btree.c
> index 766631f0562e..f76dfc8f4e1a 100644
> --- a/fs/xfs/libxfs/xfs_da_btree.c
> +++ b/fs/xfs/libxfs/xfs_da_btree.c
> @@ -2718,10 +2718,6 @@ xfs_dabuf_map(
> if (nirecs > 1) {
> map = kzalloc(nirecs * sizeof(struct xfs_buf_map),
> GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
> - if (!map) {
> - error = -ENOMEM;
> - goto out_free_irecs;
> - }
> *mapp = map;
> }
>
+1 for kcalloc.
feel free to add:
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
> --
> 2.51.0
>
>
next prev parent reply other threads:[~2026-03-04 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 3:33 hongao
2026-03-03 14:41 ` Christoph Hellwig
2026-03-04 9:50 ` Carlos Maiolino [this message]
2026-03-04 11:29 ` [PATCH v2] " hongao
2026-03-04 13:20 ` Christoph Hellwig
2026-03-05 9:47 ` 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=aagAOTTpcdRKUmBs@nidhogg.toxiclabs.cc \
--to=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=hongao@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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
all inboxes | Powered by JetHome®