diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:02 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:30 -0500 |
commit | 880566e17c4fce0d998d92610d32fcb9506aa6dd (patch) | |
tree | 74b8adcfea568bd6c99dd73412aedcff3a0e496d /fs | |
parent | 258a5aa8dfc6294f5f7df892023ee4d3e57c9841 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_acl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c index 4b11eaf6a58..39f4f809bb6 100644 --- a/fs/xfs/linux-2.6/xfs_acl.c +++ b/fs/xfs/linux-2.6/xfs_acl.c | |||
@@ -225,9 +225,6 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags) | |||
225 | struct posix_acl *acl; | 225 | struct posix_acl *acl; |
226 | int error = -EAGAIN; | 226 | int error = -EAGAIN; |
227 | 227 | ||
228 | if (flags & IPERM_FLAG_RCU) | ||
229 | return -ECHILD; | ||
230 | |||
231 | ip = XFS_I(inode); | 228 | ip = XFS_I(inode); |
232 | trace_xfs_check_acl(ip); | 229 | trace_xfs_check_acl(ip); |
233 | 230 | ||
@@ -238,6 +235,12 @@ xfs_check_acl(struct inode *inode, int mask, unsigned int flags) | |||
238 | if (!XFS_IFORK_Q(ip)) | 235 | if (!XFS_IFORK_Q(ip)) |
239 | return -EAGAIN; | 236 | return -EAGAIN; |
240 | 237 | ||
238 | if (flags & IPERM_FLAG_RCU) { | ||
239 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | ||
240 | return -ECHILD; | ||
241 | return -EAGAIN; | ||
242 | } | ||
243 | |||
241 | acl = xfs_get_acl(inode, ACL_TYPE_ACCESS); | 244 | acl = xfs_get_acl(inode, ACL_TYPE_ACCESS); |
242 | if (IS_ERR(acl)) | 245 | if (IS_ERR(acl)) |
243 | return PTR_ERR(acl); | 246 | return PTR_ERR(acl); |