xfs: provide simple rcu-walk ACL implementation
This simple implementation just checks for no ACLs on the inode, and if so, then the rcu-walk may proceed, otherwise fail it. Signed-off-by: Nick Piggin <npiggin@kernel.dk>
This commit is contained in:
@@ -225,9 +225,6 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
|
|||||||
struct posix_acl *acl;
|
struct posix_acl *acl;
|
||||||
int error = -EAGAIN;
|
int error = -EAGAIN;
|
||||||
|
|
||||||
if (flags & IPERM_FLAG_RCU)
|
|
||||||
return -ECHILD;
|
|
||||||
|
|
||||||
ip = XFS_I(inode);
|
ip = XFS_I(inode);
|
||||||
trace_xfs_check_acl(ip);
|
trace_xfs_check_acl(ip);
|
||||||
|
|
||||||
@@ -238,6 +235,12 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
|
|||||||
if (!XFS_IFORK_Q(ip))
|
if (!XFS_IFORK_Q(ip))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
|
if (flags & IPERM_FLAG_RCU) {
|
||||||
|
if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
|
||||||
|
return -ECHILD;
|
||||||
|
return -EAGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
acl = xfs_get_acl(inode, ACL_TYPE_ACCESS);
|
acl = xfs_get_acl(inode, ACL_TYPE_ACCESS);
|
||||||
if (IS_ERR(acl))
|
if (IS_ERR(acl))
|
||||||
return PTR_ERR(acl);
|
return PTR_ERR(acl);
|
||||||
|
Reference in New Issue
Block a user