diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-03-25 14:31:35 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-03-25 14:31:35 -0400 |
commit | 8937b7349ca9e25a02b2a72ccb7fba404ddedc5b (patch) | |
tree | 434ffe23d318f8af55850a26c3431ce8b82ab6f4 /fs/nfs/dir.c | |
parent | 997302259f386bca8fe1db67c50296ca426c438f (diff) | |
parent | ffe7f95bb1a4d1e9ca5d252445dc38476e1a208e (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e35c8199f82f..672368f865ca 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) | |||
1892 | cache.cred = cred; | 1892 | cache.cred = cred; |
1893 | cache.jiffies = jiffies; | 1893 | cache.jiffies = jiffies; |
1894 | status = NFS_PROTO(inode)->access(inode, &cache); | 1894 | status = NFS_PROTO(inode)->access(inode, &cache); |
1895 | if (status != 0) | 1895 | if (status != 0) { |
1896 | if (status == -ESTALE) { | ||
1897 | nfs_zap_caches(inode); | ||
1898 | if (!S_ISDIR(inode->i_mode)) | ||
1899 | set_bit(NFS_INO_STALE, &NFS_I(inode)->flags); | ||
1900 | } | ||
1896 | return status; | 1901 | return status; |
1902 | } | ||
1897 | nfs_access_add_cache(inode, &cache); | 1903 | nfs_access_add_cache(inode, &cache); |
1898 | out: | 1904 | out: |
1899 | if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) | 1905 | if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0) |