aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-27 22:12:39 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-27 22:12:39 -0400
commitdecf491f3076190262d4c649bed877650623903a (patch)
tree8f67577349fe451b0267b68435db1578ec1273a4 /fs/nfs/nfs4proc.c
parent33801147a8fda6b04d7e9afe1d42f1c01d3d6837 (diff)
NFS: Don't let nfs_end_data_update() clobber attribute update information
Since we almost always call nfs_end_data_update() after we called nfs_refresh_inode(), we now end up marking the inode metadata as needing revalidation immediately after having updated it. This patch rearranges things so that we mark the inode as needing revalidation _before_ we call nfs_refresh_inode() on those operations that need it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 2a759e8e387c..3274f2d354f3 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -187,8 +187,11 @@ static void update_changeattr(struct inode *inode, struct nfs4_change_info *cinf
187{ 187{
188 struct nfs_inode *nfsi = NFS_I(inode); 188 struct nfs_inode *nfsi = NFS_I(inode);
189 189
190 spin_lock(&inode->i_lock);
191 nfsi->cache_validity |= NFS_INO_INVALID_ATTR;
190 if (cinfo->before == nfsi->change_attr && cinfo->atomic) 192 if (cinfo->before == nfsi->change_attr && cinfo->atomic)
191 nfsi->change_attr = cinfo->after; 193 nfsi->change_attr = cinfo->after;
194 spin_unlock(&inode->i_lock);
192} 195}
193 196
194/* Helper for asynchronous RPC calls */ 197/* Helper for asynchronous RPC calls */