summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-08-02 21:32:13 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-08-03 00:58:42 -0400
commit3567866bf26190d1e734c975c907eb06e923ba23 (patch)
tree60d6b71d8ec821b121e6ab0756833d79c912908e /fs
parent951c0d660a7c35286e401ca6d6ef38c9d49643c7 (diff)
downloadblackbird-op-linux-3567866bf26190d1e734c975c907eb06e923ba23.tar.gz
blackbird-op-linux-3567866bf26190d1e734c975c907eb06e923ba23.zip
RCUify freeing acls, let check_acl() go ahead in RCU mode if acl is cached
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 445fd5da11fa..3d607bd80e09 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -179,19 +179,14 @@ static int check_acl(struct inode *inode, int mask)
#ifdef CONFIG_FS_POSIX_ACL
struct posix_acl *acl;
- /*
- * Under RCU walk, we cannot even do a "get_cached_acl()",
- * because that involves locking and getting a refcount on
- * a cached ACL.
- *
- * So the only case we handle during RCU walking is the
- * case of a cached "no ACL at all", which needs no locks
- * or refcounts.
- */
if (mask & MAY_NOT_BLOCK) {
- if (negative_cached_acl(inode, ACL_TYPE_ACCESS))
+ acl = get_cached_acl_rcu(inode, ACL_TYPE_ACCESS);
+ if (!acl)
return -EAGAIN;
- return -ECHILD;
+ /* no ->get_acl() calls in RCU mode... */
+ if (acl == ACL_NOT_CACHED)
+ return -ECHILD;
+ return posix_acl_permission(inode, acl, mask);
}
acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
OpenPOWER on IntegriCloud