From: Trond Myklebust Date: Tue, 23 Dec 2008 20:21:55 +0000 (-0500) Subject: NFS: Use delegations to optimise ACCESS calls X-Git-Tag: v2.6.29-rc1~553^2^2~28 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7a50c60e461f6ff97428da9448c3dad5b7bef491;p=linux-2.6-omap-h63xx.git NFS: Use delegations to optimise ACCESS calls Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ff167aa6243..ed7024c3488 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;