[UDP]: Make full use of proto.h.udp_hash innovation.
[deliverable/linux.git] / net / ipv4 / tcp_ipv4.c
index 0ba6e911c9797efb4067c5628155814f5e14048b..1a47719a55ad87fe876f99470125ae626c2f6b15 100644 (file)
@@ -1920,6 +1920,14 @@ int tcp_v4_destroy_sock(struct sock *sk)
                sk->sk_sndmsg_page = NULL;
        }
 
+       if (tp->defer_tcp_accept.request) {
+               reqsk_free(tp->defer_tcp_accept.request);
+               sock_put(tp->defer_tcp_accept.listen_sk);
+               sock_put(sk);
+               tp->defer_tcp_accept.listen_sk = NULL;
+               tp->defer_tcp_accept.request = NULL;
+       }
+
        atomic_dec(&tcp_sockets_allocated);
 
        return 0;
@@ -2460,7 +2468,7 @@ struct proto tcp_prot = {
        .obj_size               = sizeof(struct tcp_sock),
        .twsk_prot              = &tcp_timewait_sock_ops,
        .rsk_prot               = &tcp_request_sock_ops,
-       .hashinfo               = &tcp_hashinfo,
+       .h.hashinfo             = &tcp_hashinfo,
 #ifdef CONFIG_COMPAT
        .compat_setsockopt      = compat_tcp_setsockopt,
        .compat_getsockopt      = compat_tcp_getsockopt,
This page took 0.037232 seconds and 5 git commands to generate.