diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 3b3611729928..fa34984d0b12 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -183,8 +183,9 @@ static bool retransmits_timed_out(struct sock *sk, | |||
183 | else | 183 | else |
184 | timeout = ((2 << linear_backoff_thresh) - 1) * rto_base + | 184 | timeout = ((2 << linear_backoff_thresh) - 1) * rto_base + |
185 | (boundary - linear_backoff_thresh) * TCP_RTO_MAX; | 185 | (boundary - linear_backoff_thresh) * TCP_RTO_MAX; |
186 | timeout = jiffies_to_msecs(timeout); | ||
186 | } | 187 | } |
187 | return (tcp_time_stamp(tcp_sk(sk)) - start_ts) >= jiffies_to_msecs(timeout); | 188 | return (tcp_time_stamp(tcp_sk(sk)) - start_ts) >= timeout; |
188 | } | 189 | } |
189 | 190 | ||
190 | /* A write timeout has occurred. Process the after effects. */ | 191 | /* A write timeout has occurred. Process the after effects. */ |
@@ -337,8 +338,7 @@ static void tcp_probe_timer(struct sock *sk) | |||
337 | if (!start_ts) | 338 | if (!start_ts) |
338 | skb->skb_mstamp = tp->tcp_mstamp; | 339 | skb->skb_mstamp = tp->tcp_mstamp; |
339 | else if (icsk->icsk_user_timeout && | 340 | else if (icsk->icsk_user_timeout && |
340 | (s32)(tcp_time_stamp(tp) - start_ts) > | 341 | (s32)(tcp_time_stamp(tp) - start_ts) > icsk->icsk_user_timeout) |
341 | jiffies_to_msecs(icsk->icsk_user_timeout)) | ||
342 | goto abort; | 342 | goto abort; |
343 | 343 | ||
344 | max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2; | 344 | max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2; |
@@ -672,7 +672,7 @@ static void tcp_keepalive_timer (struct timer_list *t) | |||
672 | * to determine when to timeout instead. | 672 | * to determine when to timeout instead. |
673 | */ | 673 | */ |
674 | if ((icsk->icsk_user_timeout != 0 && | 674 | if ((icsk->icsk_user_timeout != 0 && |
675 | elapsed >= icsk->icsk_user_timeout && | 675 | elapsed >= msecs_to_jiffies(icsk->icsk_user_timeout) && |
676 | icsk->icsk_probes_out > 0) || | 676 | icsk->icsk_probes_out > 0) || |
677 | (icsk->icsk_user_timeout == 0 && | 677 | (icsk->icsk_user_timeout == 0 && |
678 | icsk->icsk_probes_out >= keepalive_probes(tp))) { | 678 | icsk->icsk_probes_out >= keepalive_probes(tp))) { |