xfs: clean up the attr flag confusion
The ATTR_* flags have a long IRIX history, where they a userspace interface, the on-disk format and an internal interface. We've split out the on-disk interface to the XFS_ATTR_* values, but despite (or because?) of that the flag have still been a mess. Switch the internal interface to pass the on-disk XFS_ATTR_* flags for the namespace and the Linux XATTR_* flags for the actual flags instead. The ATTR_* values that are actually used are move to xfs_fs.h with a new XFS_IOC_* prefix to not conflict with the userspace version that has the same name and must have the same value. 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
f3e93d95fe
commit
d5f0f49a9b
@@ -22,7 +22,6 @@
|
||||
#include "xfs_iomap.h"
|
||||
#include "xfs_error.h"
|
||||
|
||||
#include <linux/xattr.h>
|
||||
#include <linux/posix_acl.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/iversion.h>
|
||||
@@ -52,7 +51,7 @@ xfs_initxattrs(
|
||||
for (xattr = xattr_array; xattr->name != NULL; xattr++) {
|
||||
struct xfs_da_args args = {
|
||||
.dp = ip,
|
||||
.flags = ATTR_SECURE,
|
||||
.attr_filter = XFS_ATTR_SECURE,
|
||||
.name = xattr->name,
|
||||
.namelen = strlen(xattr->name),
|
||||
.value = xattr->value,
|
||||
|
Reference in New Issue
Block a user