diff mbox series

[07/29] xfs: remove the MAXNAMELEN check from xfs_attr_args_init

Message ID 20200114081051.297488-8-hch@lst.de (mailing list archive)
State Superseded
Headers show
Series [01/29] xfs: remove the ATTR_INCOMPLETE flag | expand

Commit Message

Christoph Hellwig Jan. 14, 2020, 8:10 a.m. UTC
All the callers already check the length when allocating the
in-kernel xattrs buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_attr.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Darrick J. Wong Jan. 21, 2020, 6:03 p.m. UTC | #1
On Tue, Jan 14, 2020 at 09:10:29AM +0100, Christoph Hellwig wrote:
> All the callers already check the length when allocating the
> in-kernel xattrs buffers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/libxfs/xfs_attr.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index d5064213577c..ef3c851cd278 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -72,9 +72,6 @@ xfs_attr_args_init(
>  	args->flags = flags;
>  	args->name = name;
>  	args->namelen = namelen;
> -	if (args->namelen >= MAXNAMELEN)
> -		return -EFAULT;		/* match IRIX behaviour */
> -
>  	args->hashval = xfs_da_hashname(args->name, args->namelen);
>  	return 0;
>  }
> -- 
> 2.24.1
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index d5064213577c..ef3c851cd278 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -72,9 +72,6 @@  xfs_attr_args_init(
 	args->flags = flags;
 	args->name = name;
 	args->namelen = namelen;
-	if (args->namelen >= MAXNAMELEN)
-		return -EFAULT;		/* match IRIX behaviour */
-
 	args->hashval = xfs_da_hashname(args->name, args->namelen);
 	return 0;
 }