Skip to content

Commit 880566e

Browse files
author
Nick Piggin
committed
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>
1 parent 258a5aa commit 880566e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

fs/xfs/linux-2.6/xfs_acl.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,6 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
225225
struct posix_acl *acl;
226226
int error = -EAGAIN;
227227

228-
if (flags & IPERM_FLAG_RCU)
229-
return -ECHILD;
230-
231228
ip = XFS_I(inode);
232229
trace_xfs_check_acl(ip);
233230

@@ -238,6 +235,12 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags)
238235
if (!XFS_IFORK_Q(ip))
239236
return -EAGAIN;
240237

238+
if (flags & IPERM_FLAG_RCU) {
239+
if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
240+
return -ECHILD;
241+
return -EAGAIN;
242+
}
243+
241244
acl = xfs_get_acl(inode, ACL_TYPE_ACCESS);
242245
if (IS_ERR(acl))
243246
return PTR_ERR(acl);

0 commit comments

Comments
 (0)