xfs: prefix XATTR_LIST_MAX with XFS_
authorJan Tulak <jtulak@redhat.com>
Mon, 12 Oct 2015 05:02:56 +0000 (16:02 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 12 Oct 2015 05:02:56 +0000 (16:02 +1100)
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: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl32.c

index 89689c6a43e2cf6a0f042f2abaa9dcd0da5a0873..b2b73a998d425d04779262ead61d02d65b153bc8 100644 (file)
@@ -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
  */
index ea7d85af53101f25ed0d1b9598edae5c8af77bcc..0e692a68aad503664abc8c116acfcea3d696a6aa 100644 (file)
@@ -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;
 
        /*
index b88bdc85dd3db365230d51e31fc97030ed2de38d..1a05d8ae327dbc2fa0e6d3212bbfde1a209a5502 100644 (file)
@@ -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;
 
        /*