diff options
Diffstat (limited to 'fs/nfs/nfs3acl.c')
-rw-r--r-- | fs/nfs/nfs3acl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c index 9b7362565c0c..423842f51ac9 100644 --- a/fs/nfs/nfs3acl.c +++ b/fs/nfs/nfs3acl.c | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <linux/posix_acl_xattr.h> | 5 | #include <linux/posix_acl_xattr.h> |
6 | #include <linux/nfsacl.h> | 6 | #include <linux/nfsacl.h> |
7 | 7 | ||
8 | #include "internal.h" | ||
9 | |||
8 | #define NFSDBG_FACILITY NFSDBG_PROC | 10 | #define NFSDBG_FACILITY NFSDBG_PROC |
9 | 11 | ||
10 | ssize_t nfs3_listxattr(struct dentry *dentry, char *buffer, size_t size) | 12 | ssize_t nfs3_listxattr(struct dentry *dentry, char *buffer, size_t size) |
@@ -205,6 +207,8 @@ struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type) | |||
205 | status = nfs_revalidate_inode(server, inode); | 207 | status = nfs_revalidate_inode(server, inode); |
206 | if (status < 0) | 208 | if (status < 0) |
207 | return ERR_PTR(status); | 209 | return ERR_PTR(status); |
210 | if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_ACL) | ||
211 | nfs_zap_acl_cache(inode); | ||
208 | acl = nfs3_get_cached_acl(inode, type); | 212 | acl = nfs3_get_cached_acl(inode, type); |
209 | if (acl != ERR_PTR(-EAGAIN)) | 213 | if (acl != ERR_PTR(-EAGAIN)) |
210 | return acl; | 214 | return acl; |
@@ -319,9 +323,8 @@ static int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, | |||
319 | dprintk("NFS call setacl\n"); | 323 | dprintk("NFS call setacl\n"); |
320 | msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL]; | 324 | msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL]; |
321 | status = rpc_call_sync(server->client_acl, &msg, 0); | 325 | status = rpc_call_sync(server->client_acl, &msg, 0); |
322 | spin_lock(&inode->i_lock); | 326 | nfs_access_zap_cache(inode); |
323 | NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS; | 327 | nfs_zap_acl_cache(inode); |
324 | spin_unlock(&inode->i_lock); | ||
325 | dprintk("NFS reply setacl: %d\n", status); | 328 | dprintk("NFS reply setacl: %d\n", status); |
326 | 329 | ||
327 | /* pages may have been allocated at the xdr layer. */ | 330 | /* pages may have been allocated at the xdr layer. */ |