diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-22 13:22:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-23 16:52:25 -0400 |
commit | 42cb80a2353f42913ae78074ffa1f1b4a49e5436 (patch) | |
tree | 9e56ac0332e4da25abce1e03aac9503ba62341b0 /net/ipv4 | |
parent | 2b41fab70fc001d2acd89c0477d32feb8265bb32 (diff) |
inet: remove sk_listener parameter from syn_ack_timeout()
It is not needed, and req->sk_listener points to the listener anyway.
request_sock argument can be const.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_timer.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 7d011e825c48..a12b973164d0 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -615,7 +615,7 @@ static void reqsk_timer_handler(unsigned long data) | |||
615 | max_retries = defer_accept; | 615 | max_retries = defer_accept; |
616 | syn_ack_recalc(req, thresh, max_retries, defer_accept, | 616 | syn_ack_recalc(req, thresh, max_retries, defer_accept, |
617 | &expire, &resend); | 617 | &expire, &resend); |
618 | req->rsk_ops->syn_ack_timeout(sk_listener, req); | 618 | req->rsk_ops->syn_ack_timeout(req); |
619 | if (!expire && | 619 | if (!expire && |
620 | (!resend || | 620 | (!resend || |
621 | !inet_rtx_syn_ack(sk_listener, req) || | 621 | !inet_rtx_syn_ack(sk_listener, req) || |
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 3daa6b5d766d..2568fd282873 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -327,7 +327,7 @@ static void tcp_fastopen_synack_timer(struct sock *sk) | |||
327 | struct request_sock *req; | 327 | struct request_sock *req; |
328 | 328 | ||
329 | req = tcp_sk(sk)->fastopen_rsk; | 329 | req = tcp_sk(sk)->fastopen_rsk; |
330 | req->rsk_ops->syn_ack_timeout(sk, req); | 330 | req->rsk_ops->syn_ack_timeout(req); |
331 | 331 | ||
332 | if (req->num_timeout >= max_retries) { | 332 | if (req->num_timeout >= max_retries) { |
333 | tcp_write_err(sk); | 333 | tcp_write_err(sk); |
@@ -539,9 +539,11 @@ static void tcp_write_timer(unsigned long data) | |||
539 | sock_put(sk); | 539 | sock_put(sk); |
540 | } | 540 | } |
541 | 541 | ||
542 | void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req) | 542 | void tcp_syn_ack_timeout(const struct request_sock *req) |
543 | { | 543 | { |
544 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPTIMEOUTS); | 544 | struct net *net = read_pnet(&inet_rsk(req)->ireq_net); |
545 | |||
546 | NET_INC_STATS_BH(net, LINUX_MIB_TCPTIMEOUTS); | ||
545 | } | 547 | } |
546 | EXPORT_SYMBOL(tcp_syn_ack_timeout); | 548 | EXPORT_SYMBOL(tcp_syn_ack_timeout); |
547 | 549 | ||