Skip to content

Commit

Permalink
NFS: Don't clear nfsi->cache_validity in nfs_check_inode_attributes()
Browse files Browse the repository at this point in the history
If we're merely checking the inode attributes because we suspect that the
'updated' attributes returned by the RPC call are stale, then we shouldn't
be doing weak cache consistency updates or clearing the cache_validity
flags.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 7, 2008
1 parent 4dc05ef commit 076f1fc
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,9 +905,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
return -EIO;
}

/* Do atomic weak cache consistency updates */
nfs_wcc_update_inode(inode, fattr);

if ((fattr->valid & NFS_ATTR_FATTR_V4) != 0 &&
nfsi->change_attr != fattr->change_attr)
invalid |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
Expand Down Expand Up @@ -936,10 +933,6 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat

if (invalid != 0)
nfsi->cache_validity |= invalid;
else
nfsi->cache_validity &= ~(NFS_INO_INVALID_ATTR
| NFS_INO_INVALID_ATIME
| NFS_INO_REVAL_PAGECACHE);

nfsi->read_cache_jiffies = fattr->time_start;
return 0;
Expand Down

0 comments on commit 076f1fc

Please sign in to comment.