Skip to content

Commit

Permalink
NFS: nfs_post_op_update_inode() should call nfs_refresh_inode()
Browse files Browse the repository at this point in the history
Ensure that we don't clobber the results from a more recent getattr call...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent f2115dc commit 68e8a70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 68e8a70

Please sign in to comment.