]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_ipv4.c
[netdrvr] via-velocity: misc. cleanups
[linux-2.6] / net / ipv4 / tcp_ipv4.c
index 4c6ef47eb1c372d72ba2eab9d877672b7ca9646d..5a886e6efbbedfc79ba382d131fa70338b9138d6 100644 (file)
@@ -52,7 +52,6 @@
  *                                     a single port at the same time.
  */
 
-#include <linux/config.h>
 
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -91,7 +90,7 @@ static struct socket *tcp_socket;
 void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb);
 
 struct inet_hashinfo __cacheline_aligned tcp_hashinfo = {
-       .lhash_lock     = RW_LOCK_UNLOCKED,
+       .lhash_lock     = __RW_LOCK_UNLOCKED(tcp_hashinfo.lhash_lock),
        .lhash_users    = ATOMIC_INIT(0),
        .lhash_wait     = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.lhash_wait),
 };
@@ -242,6 +241,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
                goto failure;
 
        /* OK, now commit destination to socket.  */
+       sk->sk_gso_type = SKB_GSO_TCPV4;
        sk_setup_caps(sk, &rt->u.dst);
 
        if (!tp->write_seq)
@@ -884,6 +884,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
        if (!newsk)
                goto exit;
 
+       newsk->sk_gso_type = SKB_GSO_TCPV4;
        sk_setup_caps(newsk, dst);
 
        newtp                 = tcp_sk(newsk);
@@ -1089,7 +1090,7 @@ process:
 
        skb->dev = NULL;
 
-       bh_lock_sock(sk);
+       bh_lock_sock_nested(sk);
        ret = 0;
        if (!sock_owned_by_user(sk)) {
 #ifdef CONFIG_NET_DMA