]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_timer.c
Merge with rsync://fileserver/linux
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_timer.c
index f03efe5fb76a5246e338a964f382ea35dd826605..0084227438c28d26bc2d089b1facc4675310f741 100644 (file)
@@ -231,11 +231,10 @@ static void tcp_delack_timer(unsigned long data)
        }
        tp->ack.pending &= ~TCP_ACK_TIMER;
 
-       if (skb_queue_len(&tp->ucopy.prequeue)) {
+       if (!skb_queue_empty(&tp->ucopy.prequeue)) {
                struct sk_buff *skb;
 
-               NET_ADD_STATS_BH(LINUX_MIB_TCPSCHEDULERFAILED, 
-                                skb_queue_len(&tp->ucopy.prequeue));
+               NET_INC_STATS_BH(LINUX_MIB_TCPSCHEDULERFAILED);
 
                while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
                        sk->sk_backlog_rcv(sk, skb);
@@ -464,7 +463,7 @@ out_unlock:
 static void tcp_synack_timer(struct sock *sk)
 {
        struct tcp_sock *tp = tcp_sk(sk);
-       struct tcp_listen_opt *lopt = tp->listen_opt;
+       struct listen_sock *lopt = tp->accept_queue.listen_opt;
        int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries;
        int thresh = max_retries;
        unsigned long now = jiffies;
@@ -527,12 +526,8 @@ static void tcp_synack_timer(struct sock *sk)
                                }
 
                                /* Drop this request */
-                               write_lock(&tp->syn_wait_lock);
-                               *reqp = req->dl_next;
-                               write_unlock(&tp->syn_wait_lock);
-                               lopt->qlen--;
-                               if (req->retrans == 0)
-                                       lopt->qlen_young--;
+                               tcp_synq_unlink(tp, req, reqp);
+                               reqsk_queue_removed(&tp->accept_queue, req);
                                reqsk_free(req);
                                continue;
                        }