From 1869e7c6703b36afa96afcec2d594e8252f644d4 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 19 Jan 2011 09:42:40 +0000 Subject: [PATCH] --- yaml --- r: 235053 b: refs/heads/master c: 75d5cfbe4b78cc26af7b042e23f61700b50bc294 h: refs/heads/master i: 235051: 9063ffa5a4a81a63dd70aa9e60991b27ba976848 v: v3 --- [refs] | 2 +- trunk/fs/gfs2/acl.c | 7 +++++-- trunk/fs/gfs2/ops_inode.c | 10 +++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index ff8d5f380923..efc98b278bf2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc015cb84129eb1451913cfebece270bf7a39e0f +refs/heads/master: 75d5cfbe4b78cc26af7b042e23f61700b50bc294 diff --git a/trunk/fs/gfs2/acl.c b/trunk/fs/gfs2/acl.c index 7118f1a780a9..cbc07155b1a0 100644 --- a/trunk/fs/gfs2/acl.c +++ b/trunk/fs/gfs2/acl.c @@ -80,8 +80,11 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags) struct posix_acl *acl; int error; - if (flags & IPERM_FLAG_RCU) - return -ECHILD; + if (flags & IPERM_FLAG_RCU) { + if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) + return -ECHILD; + return -EAGAIN; + } acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS); if (IS_ERR(acl)) diff --git a/trunk/fs/gfs2/ops_inode.c b/trunk/fs/gfs2/ops_inode.c index d8b26ac2e20b..09e436a50723 100644 --- a/trunk/fs/gfs2/ops_inode.c +++ b/trunk/fs/gfs2/ops_inode.c @@ -1026,9 +1026,9 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p) /** * gfs2_permission - - * @inode: - * @mask: - * @nd: passed from Linux VFS, ignored by us + * @inode: The inode + * @mask: The mask to be tested + * @flags: Indicates whether this is an RCU path walk or not * * This may be called from the VFS directly, or from within GFS2 with the * inode locked, so we look to see if the glock is already locked and only @@ -1044,11 +1044,11 @@ int gfs2_permission(struct inode *inode, int mask, unsigned int flags) int error; int unlock = 0; - if (flags & IPERM_FLAG_RCU) - return -ECHILD; ip = GFS2_I(inode); if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { + if (flags & IPERM_FLAG_RCU) + return -ECHILD; error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); if (error) return error;