/*
  * Retrieve an extended attribute by name, and its value if requested.
  *
- * If ATTR_KERNOVAL is set in args->flags, then the caller does not want the
- * value, just an indication whether the attribute exists and the size of the
- * value if it exists. The size is returned in args.valuelen.
+ * If args->valuelen is zero, then the caller does not want the value, just an
+ * indication whether the attribute exists and the size of the value if it
+ * exists. The size is returned in args.valuelen.
  *
  * If the attribute is found, but exceeds the size limit set by the caller in
  * args->valuelen, return -ERANGE with the size of the attribute that was found
        uint                    lock_mode;
        int                     error;
 
-       ASSERT((args->flags & (ATTR_ALLOC | ATTR_KERNOVAL)) || args->value);
+       ASSERT((args->flags & ATTR_ALLOC) || !args->valuelen || args->value);
 
        XFS_STATS_INC(args->dp->i_mount, xs_attr_get);
 
 
 #define ATTR_REPLACE   0x0020  /* pure set: fail if attr does not exist */
 
 #define ATTR_KERNOTIME 0x1000  /* [kernel] don't update inode timestamps */
-#define ATTR_KERNOVAL  0x2000  /* [kernel] get attr size only, not value */
 
 #define ATTR_ALLOC     0x8000  /* [kernel] allocate xattr buffer on demand */
 
 #define ATTR_KERNEL_FLAGS \
-       (ATTR_KERNOTIME | ATTR_KERNOVAL | ATTR_ALLOC)
+       (ATTR_KERNOTIME | ATTR_ALLOC)
 
 #define XFS_ATTR_FLAGS \
        { ATTR_DONTFOLLOW,      "DONTFOLLOW" }, \
        { ATTR_CREATE,          "CREATE" }, \
        { ATTR_REPLACE,         "REPLACE" }, \
        { ATTR_KERNOTIME,       "KERNOTIME" }, \
-       { ATTR_KERNOVAL,        "KERNOVAL" }, \
        { ATTR_ALLOC,           "ALLOC" }
 
 /*
 
        /*
         * No copy if all we have to do is get the length
         */
-       if (args->flags & ATTR_KERNOVAL) {
+       if (!args->valuelen) {
                args->valuelen = valuelen;
                return 0;
        }
 /*
  * Retrieve the attribute value and length.
  *
- * If ATTR_KERNOVAL is specified, only the length needs to be returned.
- * Unlike a lookup, we only return an error if the attribute does not
- * exist or we can't retrieve the value.
+ * If args->valuelen is zero, only the length needs to be returned.  Unlike a
+ * lookup, we only return an error if the attribute does not exist or we can't
+ * retrieve the value.
  */
 int
 xfs_attr_shortform_getvalue(
  * Get the value associated with an attribute name from a leaf attribute
  * list structure.
  *
- * If ATTR_KERNOVAL is specified, only the length needs to be returned.
- * Unlike a lookup, we only return an error if the attribute does not
- * exist or we can't retrieve the value.
+ * If args->valuelen is zero, only the length needs to be returned.  Unlike a
+ * lookup, we only return an error if the attribute does not exist or we can't
+ * retrieve the value.
  */
 int
 xfs_attr3_leaf_getvalue(
 
 
        trace_xfs_attr_rmtval_get(args);
 
-       ASSERT(!(args->flags & ATTR_KERNOVAL));
+       ASSERT(args->valuelen != 0);
        ASSERT(args->rmtvaluelen == args->valuelen);
 
        valuelen = args->rmtvaluelen;
 
        int arraytop;
 
        ASSERT(!context->seen_enough);
-       ASSERT(!(context->flags & ATTR_KERNOVAL));
        ASSERT(context->count >= 0);
        ASSERT(context->count < (ATTR_MAX_VALUELEN/8));
        ASSERT(context->firstu >= sizeof(*alist));
         */
        if (((long)buffer) & (sizeof(int)-1))
                return -EFAULT;
-       if (flags & ATTR_KERNOVAL)
-               bufsize = 0;
 
        /*
         * Initialize the output buffer.
 
        };
        int                     error;
 
-       /* Convert Linux syscall to XFS internal ATTR flags */
-       if (!size)
-               args.flags |= ATTR_KERNOVAL;
-
        error = xfs_attr_get(&args);
        if (error)
                return error;