From: "Darrick J. Wong" <djwong@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Chandan Babu R <chandan.babu@oracle.com>,
Dave Chinner <dchinner@redhat.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
linux-xfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] xfs: delete some dead code in xfile_create()
Date: Tue, 12 Sep 2023 08:38:24 -0700 [thread overview]
Message-ID: <20230912153824.GB28186@frogsfrogsfrogs> (raw)
In-Reply-To: <1429a5db-874d-45f4-8571-7854d15da58d@moroto.mountain>
On Tue, Sep 12, 2023 at 06:18:45PM +0300, Dan Carpenter wrote:
> The shmem_file_setup() function can't return NULL so there is no need
> to check and doing so is a bit confusing.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> No fixes tag because this is not a bug, just some confusing code.
Please don't re-send patches that have already been presented here.
https://lore.kernel.org/linux-xfs/20230824161428.GO11263@frogsfrogsfrogs/
--D
> fs/xfs/scrub/xfile.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c
> index d98e8e77c684..71779d81cad7 100644
> --- a/fs/xfs/scrub/xfile.c
> +++ b/fs/xfs/scrub/xfile.c
> @@ -70,8 +70,6 @@ xfile_create(
> return -ENOMEM;
>
> xf->file = shmem_file_setup(description, isize, 0);
> - if (!xf->file)
> - goto out_xfile;
> if (IS_ERR(xf->file)) {
> error = PTR_ERR(xf->file);
> goto out_xfile;
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-09-12 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 15:18 [PATCH] xfs: delete some dead code in xfile_create() Dan Carpenter
2023-09-12 15:38 ` Darrick J. Wong [this message]
2023-09-12 15:41 ` Alex Elder
2023-09-12 16:23 ` Darrick J. Wong
2023-09-13 7:01 ` Dan Carpenter
2023-09-13 6:32 ` Dan Carpenter
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=20230912153824.GB28186@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=chandan.babu@oracle.com \
--cc=dan.carpenter@linaro.org \
--cc=dchinner@redhat.com \
--cc=kent.overstreet@linux.dev \
--cc=kernel-janitors@vger.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