OSDN Git Service

xfs: remove the name == NULL check from xfs_attr_args_init
authorChristoph Hellwig <hch@lst.de>
Thu, 27 Feb 2020 01:30:32 +0000 (17:30 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 3 Mar 2020 04:55:52 +0000 (20:55 -0800)
All callers provide a valid name pointer, remove the redundant check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_attr.c

index bb391b9..a968158 100644 (file)
@@ -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;