xfs: remove ATTR_KERNOVAL
We can just pass down the Linux convention of a zero valuelen to just query for the existance of an attribute to the low-level code instead. The use in the legacy xfs_attr_list code only used by the ioctl interface was already dead code, as the callers check that the flag is not present. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
c36f533f14
commit
e513e25c38
@@ -94,9 +94,9 @@ xfs_attr_get_ilocked(
|
||||
/*
|
||||
* 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
|
||||
@@ -115,7 +115,7 @@ xfs_attr_get(
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user