aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index 6629f47aa7f0..27a667bce806 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -153,8 +153,8 @@ static bool retransmits_timed_out(struct sock *sk,
153 unsigned int timeout, 153 unsigned int timeout,
154 bool syn_set) 154 bool syn_set)
155{ 155{
156 unsigned int linear_backoff_thresh, start_ts;
157 unsigned int rto_base = syn_set ? TCP_TIMEOUT_INIT : TCP_RTO_MIN; 156 unsigned int rto_base = syn_set ? TCP_TIMEOUT_INIT : TCP_RTO_MIN;
157 unsigned int linear_backoff_thresh, start_ts;
158 158
159 if (!inet_csk(sk)->icsk_retransmits) 159 if (!inet_csk(sk)->icsk_retransmits)
160 return false; 160 return false;
@@ -172,7 +172,7 @@ static bool retransmits_timed_out(struct sock *sk,
172 timeout = ((2 << linear_backoff_thresh) - 1) * rto_base + 172 timeout = ((2 << linear_backoff_thresh) - 1) * rto_base +
173 (boundary - linear_backoff_thresh) * TCP_RTO_MAX; 173 (boundary - linear_backoff_thresh) * TCP_RTO_MAX;
174 } 174 }
175 return (tcp_time_stamp - start_ts) >= timeout; 175 return (tcp_time_stamp(tcp_sk(sk)) - start_ts) >= jiffies_to_msecs(timeout);
176} 176}
177 177
178/* A write timeout has occurred. Process the after effects. */ 178/* A write timeout has occurred. Process the after effects. */
@@ -341,7 +341,7 @@ static void tcp_probe_timer(struct sock *sk)
341 if (!start_ts) 341 if (!start_ts)
342 tcp_send_head(sk)->skb_mstamp = tp->tcp_mstamp; 342 tcp_send_head(sk)->skb_mstamp = tp->tcp_mstamp;
343 else if (icsk->icsk_user_timeout && 343 else if (icsk->icsk_user_timeout &&
344 (s32)(tcp_time_stamp - start_ts) > icsk->icsk_user_timeout) 344 (s32)(tcp_time_stamp(tp) - start_ts) > icsk->icsk_user_timeout)
345 goto abort; 345 goto abort;
346 346
347 max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2; 347 max_probes = sock_net(sk)->ipv4.sysctl_tcp_retries2;
@@ -561,7 +561,7 @@ void tcp_write_timer_handler(struct sock *sk)
561 goto out; 561 goto out;
562 } 562 }
563 563
564 skb_mstamp_get(&tcp_sk(sk)->tcp_mstamp); 564 tcp_mstamp_refresh(tcp_sk(sk));
565 event = icsk->icsk_pending; 565 event = icsk->icsk_pending;
566 566
567 switch (event) { 567 switch (event) {