diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-06-19 01:47:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-19 01:47:59 -0400 |
commit | 0e87506fcc734647c7b2497eee4eb81e785c857a (patch) | |
tree | bb8863c59fdef2628f17b6773c52801792a57722 /net/ipv4/tcp_timer.c | |
parent | 60236fdd08b2169045a3bbfc5ffe1576e6c3c17b (diff) |
[NET] Generalise tcp_listen_opt
This chunks out the accept_queue and tcp_listen_opt code and moves
them to net/core/request_sock.c and include/net/request_sock.h, to
make it useful for other transport protocols, DCCP being the first one
to use it.
Next patches will rename tcp_listen_opt to accept_sock and remove the
inline tcp functions that just call a reqsk_queue_ function.
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index f03efe5fb76a..d97d191149c1 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -464,7 +464,7 @@ out_unlock: | |||
464 | static void tcp_synack_timer(struct sock *sk) | 464 | static void tcp_synack_timer(struct sock *sk) |
465 | { | 465 | { |
466 | struct tcp_sock *tp = tcp_sk(sk); | 466 | struct tcp_sock *tp = tcp_sk(sk); |
467 | struct tcp_listen_opt *lopt = tp->listen_opt; | 467 | struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; |
468 | int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries; | 468 | int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries; |
469 | int thresh = max_retries; | 469 | int thresh = max_retries; |
470 | unsigned long now = jiffies; | 470 | unsigned long now = jiffies; |
@@ -527,12 +527,8 @@ static void tcp_synack_timer(struct sock *sk) | |||
527 | } | 527 | } |
528 | 528 | ||
529 | /* Drop this request */ | 529 | /* Drop this request */ |
530 | write_lock(&tp->syn_wait_lock); | 530 | tcp_synq_unlink(tp, req, reqp); |
531 | *reqp = req->dl_next; | 531 | reqsk_queue_removed(&tp->accept_queue, req); |
532 | write_unlock(&tp->syn_wait_lock); | ||
533 | lopt->qlen--; | ||
534 | if (req->retrans == 0) | ||
535 | lopt->qlen_young--; | ||
536 | reqsk_free(req); | 532 | reqsk_free(req); |
537 | continue; | 533 | continue; |
538 | } | 534 | } |