diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 3ad938cecd73..7c8ca175d87b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -656,7 +656,7 @@ int nfs_attribute_timeout(struct inode *inode) | |||
656 | 656 | ||
657 | if (nfs_have_delegation(inode, FMODE_READ)) | 657 | if (nfs_have_delegation(inode, FMODE_READ)) |
658 | return 0; | 658 | return 0; |
659 | return time_after(jiffies, nfsi->read_cache_jiffies+nfsi->attrtimeo); | 659 | return !time_in_range(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo); |
660 | } | 660 | } |
661 | 661 | ||
662 | /** | 662 | /** |
@@ -1055,7 +1055,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1055 | nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); | 1055 | nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE); |
1056 | nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); | 1056 | nfsi->attrtimeo = NFS_MINATTRTIMEO(inode); |
1057 | nfsi->attrtimeo_timestamp = now; | 1057 | nfsi->attrtimeo_timestamp = now; |
1058 | } else if (time_after(now, nfsi->attrtimeo_timestamp+nfsi->attrtimeo)) { | 1058 | } else if (!time_in_range(now, nfsi->attrtimeo_timestamp, nfsi->attrtimeo_timestamp + nfsi->attrtimeo)) { |
1059 | if ((nfsi->attrtimeo <<= 1) > NFS_MAXATTRTIMEO(inode)) | 1059 | if ((nfsi->attrtimeo <<= 1) > NFS_MAXATTRTIMEO(inode)) |
1060 | nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); | 1060 | nfsi->attrtimeo = NFS_MAXATTRTIMEO(inode); |
1061 | nfsi->attrtimeo_timestamp = now; | 1061 | nfsi->attrtimeo_timestamp = now; |