diff options
-rw-r--r-- | fs/nfs/inode.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e25009f35cc2..6554281e24a2 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -933,10 +933,10 @@ static int nfs_inode_attrs_need_update(const struct inode *inode, const struct n | |||
933 | { | 933 | { |
934 | const struct nfs_inode *nfsi = NFS_I(inode); | 934 | const struct nfs_inode *nfsi = NFS_I(inode); |
935 | 935 | ||
936 | return nfs_ctime_need_update(inode, fattr) || | 936 | return time_after(fattr->time_start, nfsi->last_updated) || |
937 | nfs_size_need_update(inode, fattr) || | 937 | nfs_ctime_need_update(inode, fattr) || |
938 | time_after(fattr->time_start, nfsi->last_updated) || | 938 | nfs_size_need_update(inode, fattr) || |
939 | time_after(nfsi->last_updated, jiffies); | 939 | time_after(nfsi->last_updated, jiffies); |
940 | } | 940 | } |
941 | 941 | ||
942 | static int nfs_refresh_inode_locked(struct inode *inode, struct nfs_fattr *fattr) | 942 | static int nfs_refresh_inode_locked(struct inode *inode, struct nfs_fattr *fattr) |
@@ -1167,11 +1167,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1167 | nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); | 1167 | nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); |
1168 | nfsi->attrtimeo_timestamp = now; | 1168 | nfsi->attrtimeo_timestamp = now; |
1169 | } | 1169 | } |
1170 | /* | ||
1171 | * Avoid jiffy wraparound issues with nfsi->last_updated | ||
1172 | */ | ||
1173 | if (!time_in_range(nfsi->last_updated, nfsi->read_cache_jiffies, now)) | ||
1174 | nfsi->last_updated = nfsi->read_cache_jiffies; | ||
1175 | } | 1170 | } |
1176 | invalid &= ~NFS_INO_INVALID_ATTR; | 1171 | invalid &= ~NFS_INO_INVALID_ATTR; |
1177 | /* Don't invalidate the data if we were to blame */ | 1172 | /* Don't invalidate the data if we were to blame */ |