Skip to content

Commit

Permalink
NFS: Don't revalidate dentries on directory size or ctime changes
Browse files Browse the repository at this point in the history
We only need to look at the mtime changes...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 2f78e43 commit 12b373e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,10 +1015,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
nfsi->cache_change_attribute = now;
}
/* If ctime has changed we should definitely clear access+acl caches */
if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) {
if (!timespec_equal(&inode->i_ctime, &fattr->ctime))
invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL;
nfsi->cache_change_attribute = now;
}
} else if (nfsi->change_attr != fattr->change_attr) {
dprintk("NFS: change_attr change on server for file %s/%ld\n",
inode->i_sb->s_id, inode->i_ino);
Expand All @@ -1036,7 +1034,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
inode->i_size = new_isize;
invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA;
}
nfsi->cache_change_attribute = now;
dprintk("NFS: isize change on server for file %s/%ld\n",
inode->i_sb->s_id, inode->i_ino);
}
Expand Down

0 comments on commit 12b373e

Please sign in to comment.