diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-01-19 04:42:40 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-01-21 04:39:24 -0500 |
commit | 75d5cfbe4b78cc26af7b042e23f61700b50bc294 (patch) | |
tree | 189346d6c6fb7e72921d7ace2871bfd8780110da /fs/gfs2 | |
parent | bc015cb84129eb1451913cfebece270bf7a39e0f (diff) |
GFS2: Post-VFS scale update for RCU path walk
We can allow a few more cases to use RCU path walking than
originally allowed. It should be possible to also enable
RCU path walking when the glock is already cached. Thats
a bit more complicated though, so left for a future patch.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Nick Piggin <npiggin@gmail.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/acl.c | 7 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 7118f1a780a9..cbc07155b1a0 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c | |||
@@ -80,8 +80,11 @@ int gfs2_check_acl(struct inode *inode, int mask, unsigned int flags) | |||
80 | struct posix_acl *acl; | 80 | struct posix_acl *acl; |
81 | int error; | 81 | int error; |
82 | 82 | ||
83 | if (flags & IPERM_FLAG_RCU) | 83 | if (flags & IPERM_FLAG_RCU) { |
84 | return -ECHILD; | 84 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) |
85 | return -ECHILD; | ||
86 | return -EAGAIN; | ||
87 | } | ||
85 | 88 | ||
86 | acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS); | 89 | acl = gfs2_acl_get(GFS2_I(inode), ACL_TYPE_ACCESS); |
87 | if (IS_ERR(acl)) | 90 | if (IS_ERR(acl)) |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index d8b26ac2e20b..09e436a50723 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -1026,9 +1026,9 @@ static void gfs2_put_link(struct dentry *dentry, struct nameidata *nd, void *p) | |||
1026 | 1026 | ||
1027 | /** | 1027 | /** |
1028 | * gfs2_permission - | 1028 | * gfs2_permission - |
1029 | * @inode: | 1029 | * @inode: The inode |
1030 | * @mask: | 1030 | * @mask: The mask to be tested |
1031 | * @nd: passed from Linux VFS, ignored by us | 1031 | * @flags: Indicates whether this is an RCU path walk or not |
1032 | * | 1032 | * |
1033 | * This may be called from the VFS directly, or from within GFS2 with the | 1033 | * This may be called from the VFS directly, or from within GFS2 with the |
1034 | * inode locked, so we look to see if the glock is already locked and only | 1034 | * 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) | |||
1044 | int error; | 1044 | int error; |
1045 | int unlock = 0; | 1045 | int unlock = 0; |
1046 | 1046 | ||
1047 | if (flags & IPERM_FLAG_RCU) | ||
1048 | return -ECHILD; | ||
1049 | 1047 | ||
1050 | ip = GFS2_I(inode); | 1048 | ip = GFS2_I(inode); |
1051 | if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { | 1049 | if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { |
1050 | if (flags & IPERM_FLAG_RCU) | ||
1051 | return -ECHILD; | ||
1052 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); | 1052 | error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); |
1053 | if (error) | 1053 | if (error) |
1054 | return error; | 1054 | return error; |