From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfsprogs: remove unreachable code in libxfs_inode_alloc
Date: Tue, 7 Apr 2015 09:37:19 -0400 [thread overview]
Message-ID: <20150407133718.GF23208@bfoster.bfoster> (raw)
In-Reply-To: <5522C22E.4000107@redhat.com>
On Mon, Apr 06, 2015 at 12:28:14PM -0500, Eric Sandeen wrote:
> This code does:
>
> if (!ialloc_context && !ip)
> return;
>
> // if !ip here, ialloc_context must be true
>
> if (ialloc_context) {
> ...
> if (!ip)
> error = ENOSPC;
> if (error)
> return error;
> // if !ip in this block we've returned
> }
>
> // so (!ip) cannot be true here
> if (!ip)
> error = ENOSPC;
>
> (cherry picked this one out of Coverity reports)
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
>
> diff --git a/libxfs/util.c b/libxfs/util.c
> index 6464a1b..49eb76d 100644
> --- a/libxfs/util.c
> +++ b/libxfs/util.c
> @@ -700,8 +700,6 @@ libxfs_inode_alloc(
> if (error)
> return error;
> }
> - if (!ip)
> - error = ENOSPC;
>
> *ipp = ip;
> return error;
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-04-07 13:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 17:28 [PATCH] xfsprogs: remove unreachable code in libxfs_inode_alloc Eric Sandeen
2015-04-07 13:37 ` Brian Foster [this message]
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=20150407133718.GF23208@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.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