diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:08 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:08 -0500 |
commit | fb374d24f225f38f13dbffb65dd7ec72daf08dba (patch) | |
tree | bc87f6acbcb7a36ccb69930a6d10deed4fd1514a | |
parent | c8d149f3dbd582a101aa7da7bdd6c3316efd11b4 (diff) | |
download | linux-fb374d24f225f38f13dbffb65dd7ec72daf08dba.tar.bz2 |
NFS: reduce the number of false cache invalidations.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 0e1ef97bcf54..24988f430e4b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1328,11 +1328,8 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat cur_size = i_size_read(inode); new_isize = nfs_size_to_loff_t(fattr->size); - if (cur_size != new_isize) { - nfsi->cache_validity |= NFS_INO_INVALID_ATTR; - if (nfsi->npages == 0) - nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE; - } + if (cur_size != new_isize && nfsi->npages == 0) + nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; /* Have any file permissions changed? */ if ((inode->i_mode & S_IALLUGO) != (fattr->mode & S_IALLUGO) |