提交 4e247614 编写于 作者: J Jan Tulak 提交者: Dave Chinner

xfs: prefix XATTR_LIST_MAX with XFS_

Remove a hard dependency of Linux XATTR_LIST_MAX value by using
a prefixed version. This patch reflects the same change in xfsprogs.
Signed-off-by: NJan Tulak <jtulak@redhat.com>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Signed-off-by: NDave Chinner <david@fromorbit.com>
上级 fef4ded8
......@@ -489,6 +489,16 @@ typedef struct xfs_swapext
#define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */
#define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */
/*
* ioctl limits
*/
#ifdef XATTR_LIST_MAX
# define XFS_XATTR_LIST_MAX XATTR_LIST_MAX
#else
# define XFS_XATTR_LIST_MAX 65536
#endif
/*
* ioctl commands that are used by Linux filesystems
*/
......
......@@ -411,7 +411,7 @@ xfs_attrlist_by_handle(
if (copy_from_user(&al_hreq, arg, sizeof(xfs_fsop_attrlist_handlereq_t)))
return -EFAULT;
if (al_hreq.buflen < sizeof(struct attrlist) ||
al_hreq.buflen > XATTR_LIST_MAX)
al_hreq.buflen > XFS_XATTR_LIST_MAX)
return -EINVAL;
/*
......
......@@ -356,7 +356,7 @@ xfs_compat_attrlist_by_handle(
sizeof(compat_xfs_fsop_attrlist_handlereq_t)))
return -EFAULT;
if (al_hreq.buflen < sizeof(struct attrlist) ||
al_hreq.buflen > XATTR_LIST_MAX)
al_hreq.buflen > XFS_XATTR_LIST_MAX)
return -EINVAL;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册