diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-06-11 17:39:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:19 -0400 |
commit | f41f741838480aeaa3a189cff6e210503cf9c42d (patch) | |
tree | fc4509d47132c28ca211e57d8f59b56accb6db8b /fs/nfs/nfs4proc.c | |
parent | 2e96d2867245668dbdb973729288cf69b9fafa66 (diff) |
NFS: Ensure we zap only the access and acl caches when setting new acls
...and ensure that we obey the NFS_INO_INVALID_ACL flag when retrieving the
acls.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 058723d9122d..10f01c05a4e4 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2695,6 +2695,8 @@ static ssize_t nfs4_proc_get_acl(struct inode *inode, void *buf, size_t buflen) | |||
2695 | ret = nfs_revalidate_inode(server, inode); | 2695 | ret = nfs_revalidate_inode(server, inode); |
2696 | if (ret < 0) | 2696 | if (ret < 0) |
2697 | return ret; | 2697 | return ret; |
2698 | if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_ACL) | ||
2699 | nfs_zap_acl_cache(inode); | ||
2698 | ret = nfs4_read_cached_acl(inode, buf, buflen); | 2700 | ret = nfs4_read_cached_acl(inode, buf, buflen); |
2699 | if (ret != -ENOENT) | 2701 | if (ret != -ENOENT) |
2700 | return ret; | 2702 | return ret; |
@@ -2722,7 +2724,8 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl | |||
2722 | nfs_inode_return_delegation(inode); | 2724 | nfs_inode_return_delegation(inode); |
2723 | buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase); | 2725 | buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase); |
2724 | ret = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); | 2726 | ret = rpc_call_sync(NFS_CLIENT(inode), &msg, 0); |
2725 | nfs_zap_caches(inode); | 2727 | nfs_access_zap_cache(inode); |
2728 | nfs_zap_acl_cache(inode); | ||
2726 | return ret; | 2729 | return ret; |
2727 | } | 2730 | } |
2728 | 2731 | ||