summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-08-15 18:59:12 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 23:18:43 +0200
commit68e8a70d3cae23716f6b2b3872eba10eccea148c (patch)
treeae1cdf2370aa8f77e6a953d665576919699df32d /fs/nfs/inode.c
parentNFS: Fix over-conservative attribute invalidation in nfs_update_inode() (diff)
downloadlinux-68e8a70d3cae23716f6b2b3872eba10eccea148c.tar.xz
linux-68e8a70d3cae23716f6b2b3872eba10eccea148c.zip
NFS: nfs_post_op_update_inode() should call nfs_refresh_inode()
Ensure that we don't clobber the results from a more recent getattr call... Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 721e511f8ba9..0d98074d0766 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -915,14 +915,14 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
struct nfs_inode *nfsi = NFS_I(inode);
int status = 0;
- spin_lock(&inode->i_lock);
if (unlikely((fattr->valid & NFS_ATTR_FATTR) == 0)) {
+ spin_lock(&inode->i_lock);
nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
+ spin_unlock(&inode->i_lock);
goto out;
}
- status = nfs_update_inode(inode, fattr);
+ status = nfs_refresh_inode(inode, fattr);
out:
- spin_unlock(&inode->i_lock);
return status;
}