aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-18 23:53:57 -0700
commit0702b30dd821ac8a4103ddbe545518713fdca9be (patch)
tree8ce0c9f5e58c5ccb99870505eecd139986caa05e /fs/nfs/dir.c
parent192d7a4667c6d11d1a174ec4cad9a3c5d5f9043c (diff)
parenta1e4ee22863d41a6fbb24310d7951836cb6dafe7 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e35c8199f82..672368f865c 100644
--- a/fs/nfs/dir.c
+++ b/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)