aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-01-19 15:56:50 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2012-01-19 15:56:50 -0500
commit282f445a779ed76fca9884fe377bf56a3088b208 (patch)
treed9abcf526baee0100672851e0a8894c19e762a39 /net/ipv4/tcp_timer.c
parent68f30fbee19cc67849b9fa8e153ede70758afe81 (diff)
parent90a4c0f51e8e44111a926be6f4c87af3938a79c3 (diff)
Merge remote-tracking branch 'linus/master' into x86/urgent
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 2e0f0af76c19..a516d1e399df 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -171,13 +171,13 @@ static int tcp_write_timeout(struct sock *sk)
171{ 171{
172 struct inet_connection_sock *icsk = inet_csk(sk); 172 struct inet_connection_sock *icsk = inet_csk(sk);
173 int retry_until; 173 int retry_until;
174 bool do_reset, syn_set = 0; 174 bool do_reset, syn_set = false;
175 175
176 if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) { 176 if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
177 if (icsk->icsk_retransmits) 177 if (icsk->icsk_retransmits)
178 dst_negative_advice(sk); 178 dst_negative_advice(sk);
179 retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; 179 retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries;
180 syn_set = 1; 180 syn_set = true;
181 } else { 181 } else {
182 if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) { 182 if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
183 /* Black hole detection */ 183 /* Black hole detection */
@@ -261,7 +261,7 @@ static void tcp_delack_timer(unsigned long data)
261 } 261 }
262 262
263out: 263out:
264 if (tcp_memory_pressure) 264 if (sk_under_memory_pressure(sk))
265 sk_mem_reclaim(sk); 265 sk_mem_reclaim(sk);
266out_unlock: 266out_unlock:
267 bh_unlock_sock(sk); 267 bh_unlock_sock(sk);
@@ -340,7 +340,7 @@ void tcp_retransmit_timer(struct sock *sk)
340 &inet->inet_daddr, ntohs(inet->inet_dport), 340 &inet->inet_daddr, ntohs(inet->inet_dport),
341 inet->inet_num, tp->snd_una, tp->snd_nxt); 341 inet->inet_num, tp->snd_una, tp->snd_nxt);
342 } 342 }
343#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 343#if IS_ENABLED(CONFIG_IPV6)
344 else if (sk->sk_family == AF_INET6) { 344 else if (sk->sk_family == AF_INET6) {
345 struct ipv6_pinfo *np = inet6_sk(sk); 345 struct ipv6_pinfo *np = inet6_sk(sk);
346 LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n", 346 LIMIT_NETDEBUG(KERN_DEBUG "TCP: Peer %pI6:%u/%u unexpectedly shrunk window %u:%u (repaired)\n",