From 7c1807f9d0dce9ed4700636a58402c447759781c Mon Sep 17 00:00:00 2001 From: Suresh Jayaraman Date: Tue, 10 Mar 2009 20:33:21 -0400 Subject: [PATCH] --- yaml --- r: 132303 b: refs/heads/master c: a71ee337b31271e701f689d544b6153b75609bc5 h: refs/heads/master i: 132301: bc3375911abba871db62b89b040236cdc02747ef 132299: 639edb7295e3dfaeae6b5ba3e6b11721e2044562 132295: 36bc08c0c2f04aab62a98dd64cdfd33799473d91 132287: b7d0de1a7be6a5c168a0c38aece9807d4c322b74 v: v3 --- [refs] | 2 +- trunk/fs/nfs/dir.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8a3647b1ae74..0b77588cd7e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 57df675c60c5cf0748ddba9c7f85afde1530d74d +refs/heads/master: a71ee337b31271e701f689d544b6153b75609bc5 diff --git a/trunk/fs/nfs/dir.c b/trunk/fs/nfs/dir.c index e35c8199f82f..672368f865ca 100644 --- a/trunk/fs/nfs/dir.c +++ b/trunk/fs/nfs/dir.c @@ -1892,8 +1892,14 @@ static int nfs_do_access(struct inode *inode, struct rpc_cred *cred, int mask) cache.cred = cred; cache.jiffies = jiffies; status = NFS_PROTO(inode)->access(inode, &cache); - if (status != 0) + if (status != 0) { + if (status == -ESTALE) { + nfs_zap_caches(inode); + if (!S_ISDIR(inode->i_mode)) + set_bit(NFS_INO_STALE, &NFS_I(inode)->flags); + } return status; + } nfs_access_add_cache(inode, &cache); out: if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0)