Re: [PATCH][V2] btrfs: remove redundant inode null check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 20, 2016 at 04:18:37PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

Added to cleanups queue, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux