summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-08 09:24:22 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:20:47 -0400
commit40d24704091c8a29a4c99d25670f1996749aea6f (patch)
tree511140e99865bd1610a6df1bd81c9321b7749005 /fs/nfs/inode.c
parent9e08a3c5aec5b745e844328bcbc16458b6118faf (diff)
downloadtalos-obmc-linux-40d24704091c8a29a4c99d25670f1996749aea6f.tar.gz
talos-obmc-linux-40d24704091c8a29a4c99d25670f1996749aea6f.zip
NFS: Fix a connectathon regression in NFSv3 and NFSv4
We're failing basic test6 against Linux servers because they lack a correct change attribute. The fix is to assume that we always want to invalidate the readdir caches when we call update_changeattr and/or nfs_post_op_update_inode on a directory. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 469387920dd9..c44cd02e5181 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -876,11 +876,19 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{
struct nfs_inode *nfsi = NFS_I(inode);
- if (fattr->valid & NFS_ATTR_FATTR)
+ if (fattr->valid & NFS_ATTR_FATTR) {
+ if (S_ISDIR(inode->i_mode)) {
+ spin_lock(&inode->i_lock);
+ nfsi->cache_validity |= NFS_INO_INVALID_DATA;
+ spin_unlock(&inode->i_lock);
+ }
return nfs_refresh_inode(inode, fattr);
+ }
spin_lock(&inode->i_lock);
nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
+ if (S_ISDIR(inode->i_mode))
+ nfsi->cache_validity |= NFS_INO_INVALID_DATA;
spin_unlock(&inode->i_lock);
return 0;
}
OpenPOWER on IntegriCloud