Re: [PATCH 07/30] xfs: remove the name == NULL check from xfs_attr_args_init

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

 



On Wednesday, January 29, 2020 10:32 PM Christoph Hellwig wrote: 

> All callers provide a valid name pointer, remove the redundant check.
>

I went through the callers of xfs_attr_args_init() (and in turn to callers of
those callers) and found that 'name' arg can indeed never be NULL.

Reviewed-by: Chandan Rajendra <chandanrlinux@xxxxxxxxx>

> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_attr.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index bb391b96cd78..a968158b9bb1 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -65,10 +65,6 @@ xfs_attr_args_init(
>  	size_t			namelen,
>  	int			flags)
>  {
> -
> -	if (!name)
> -		return -EINVAL;
> -
>  	memset(args, 0, sizeof(*args));
>  	args->geo = dp->i_mount->m_attr_geo;
>  	args->whichfork = XFS_ATTR_FORK;
> 


-- 
chandan






[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux