mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Colin King <colin.king@canonical.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] btrfs: remove redundant inode null check
Date: Tue, 20 Dec 2016 17:27:52 +0100	[thread overview]
Message-ID: <20161220162752.GO3620@twin.jikos.cz> (raw)
In-Reply-To: <20161220161837.24391-1-colin.king@canonical.com>

On Tue, Dec 20, 2016 at 04:18:37PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The check for a null inode is redundant since the function
> is a callback for exportfs, which will itself crash if
> dentry->d_inode or parent->d_inode is NULL.  Removing the
> null check makes this consistent with other file systems.
> 
> Also remove the redundant null dir check too.
> 
> Found with static analysis by CoverityScan, CID 1389472
> 
> Kudos to Jeff Mahoney for reviewing and explaining the error in
> my original patch (most of this explanation went into the above
> commit message) and David Sterba for pointing out that the dir
> check is also redundant.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: David Sterba <dsterba@suse.com>

Added to cleanups queue, thanks.

      reply	other threads:[~2016-12-20 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20 16:18 Colin King
2016-12-20 16:27 ` David Sterba [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=20161220162752.GO3620@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=colin.king@canonical.com \
    --cc=dsterba@suse.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®