diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-01 09:56:59 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:19:35 -0400 |
commit | 12b373ebf05485d4937dd63a00c16f8efeaa79ba (patch) | |
tree | d9a50191cecd59cec36b8dc6b2257c9098681a32 /fs/nfs/inode.c | |
parent | 2f78e4313afd34a4ded591ec5687843113fbaa01 (diff) |
NFS: Don't revalidate dentries on directory size or ctime changes
We only need to look at the mtime changes...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 8c53b7eff7ba..7fdaaf5869ce 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1015,10 +1015,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1015 | nfsi->cache_change_attribute = now; | 1015 | nfsi->cache_change_attribute = now; |
1016 | } | 1016 | } |
1017 | /* If ctime has changed we should definitely clear access+acl caches */ | 1017 | /* If ctime has changed we should definitely clear access+acl caches */ |
1018 | if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) { | 1018 | if (!timespec_equal(&inode->i_ctime, &fattr->ctime)) |
1019 | invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; | 1019 | invalid |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; |
1020 | nfsi->cache_change_attribute = now; | ||
1021 | } | ||
1022 | } else if (nfsi->change_attr != fattr->change_attr) { | 1020 | } else if (nfsi->change_attr != fattr->change_attr) { |
1023 | dprintk("NFS: change_attr change on server for file %s/%ld\n", | 1021 | dprintk("NFS: change_attr change on server for file %s/%ld\n", |
1024 | inode->i_sb->s_id, inode->i_ino); | 1022 | inode->i_sb->s_id, inode->i_ino); |
@@ -1036,7 +1034,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1036 | inode->i_size = new_isize; | 1034 | inode->i_size = new_isize; |
1037 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; | 1035 | invalid |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA; |
1038 | } | 1036 | } |
1039 | nfsi->cache_change_attribute = now; | ||
1040 | dprintk("NFS: isize change on server for file %s/%ld\n", | 1037 | dprintk("NFS: isize change on server for file %s/%ld\n", |
1041 | inode->i_sb->s_id, inode->i_ino); | 1038 | inode->i_sb->s_id, inode->i_ino); |
1042 | } | 1039 | } |