diff mbox series

[11/33] xfs: remove the MAXNAMELEN check from xfs_attr_args_init

Message ID 20191212105433.1692-12-hch@lst.de (mailing list archive)
State Superseded
Headers show
Series [01/33] xfs: clear kernel only flags in XFS_IOC_ATTRMULTI_BY_HANDLE | expand

Commit Message

Christoph Hellwig Dec. 12, 2019, 10:54 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(-)
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 4a120a6483ee..31cc42c46437 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -71,9 +71,6 @@  xfs_attr_args_init(
 	args->flags = flags;
 	args->name = name;
 	args->namelen = strlen((const char *)name);
-	if (args->namelen >= MAXNAMELEN)
-		return -EFAULT;		/* match IRIX behaviour */
-
 	args->hashval = xfs_da_hashname(args->name, args->namelen);
 	return 0;
 }