All the ACL routines are called from inode operations which are guaranteed
to have a referenced inode by the VFS, so there's no need for the ACL code
to grab another temporary one.
SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31763a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
posix_acl_xattr_header *ext_acl = acl;
int flags = 0;
posix_acl_xattr_header *ext_acl = acl;
int flags = 0;
if(size) {
if (!(_ACL_ALLOC(xfs_acl))) {
error = ENOMEM;
if(size) {
if (!(_ACL_ALLOC(xfs_acl))) {
error = ENOMEM;
error = -posix_acl_xfs_to_xattr(xfs_acl, ext_acl, size);
}
out:
error = -posix_acl_xfs_to_xattr(xfs_acl, ext_acl, size);
}
out:
if(xfs_acl)
_ACL_FREE(xfs_acl);
return -error;
if(xfs_acl)
_ACL_FREE(xfs_acl);
return -error;
error = xfs_acl_allow_set(vp, kind);
if (!error) {
error = xfs_attr_remove(XFS_I(vp),
error = xfs_acl_allow_set(vp, kind);
if (!error) {
error = xfs_attr_remove(XFS_I(vp),
if (error == ENOATTR)
error = 0; /* 'scool */
}
if (error == ENOATTR)
error = 0; /* 'scool */
}
error = xfs_acl_allow_set(vp, kind);
/* Incoming ACL exists, set file mode based on its value */
error = xfs_acl_allow_set(vp, kind);
/* Incoming ACL exists, set file mode based on its value */
_ACL_FREE(xfs_acl);
return -error;
}
_ACL_FREE(xfs_acl);
return -error;
}