diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 21:21:55 +0100 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 21:21:55 +0100 |
commit | 7a50c60e461f6ff97428da9448c3dad5b7bef491 (patch) | |
tree | 311c584f990377c1cb16b178db4ad54ede3bea03 /fs/nfs/dir.c | |
parent | NFSv4: Ensure that we set the verifier when revalidating delegated dentries (diff) | |
download | linux-7a50c60e461f6ff97428da9448c3dad5b7bef491.tar.xz linux-7a50c60e461f6ff97428da9448c3dad5b7bef491.zip |
NFS: Use delegations to optimise ACCESS calls
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ff167aa62434..ed7024c34885 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1797,7 +1797,8 @@ static int nfs_access_get_cached(struct inode *inode, struct rpc_cred *cred, str cache = nfs_access_search_rbtree(inode, cred); if (cache == NULL) goto out; - if (!time_in_range(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo)) + if (!nfs_have_delegation(inode, FMODE_READ) && + !time_in_range(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo)) goto out_stale; res->jiffies = cache->jiffies; res->cred = cache->cred; |