]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[INET]: Drop the inet_inherit_port() call.
authorPavel Emelyanov <xemul@openvz.org>
Fri, 18 Apr 2008 06:17:34 +0000 (23:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Apr 2008 06:17:34 +0000 (23:17 -0700)
As I can see from the code, two places (tcp_v6_syn_recv_sock and
dccp_v6_request_recv_sock) that call this one already run with
BHs disabled, so it's safe to call __inet_inherit_port there.

Besides (in case I missed smth with code review) the calltrace
tcp_v6_syn_recv_sock
 `- tcp_v4_syn_recv_sock
     `- __inet_inherit_port
and the similar for DCCP are valid, but assumes BHs to be disabled.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
net/dccp/ipv6.c
net/ipv6/tcp_ipv6.c

index 5525227c5e9254234e86474c3c0c5f3507a53025..5ec91d88b517f597a10ea2329fa4d7f4e80561bd 100644 (file)
@@ -235,13 +235,6 @@ static inline void __inet_inherit_port(struct sock *sk, struct sock *child)
        spin_unlock(&head->lock);
 }
 
-static inline void inet_inherit_port(struct sock *sk, struct sock *child)
-{
-       local_bh_disable();
-       __inet_inherit_port(sk, child);
-       local_bh_enable();
-}
-
 extern void inet_put_port(struct sock *sk);
 
 extern void inet_listen_wlock(struct inet_hashinfo *hashinfo);
index f8371c7e5e80286764cb87cbd52728fae3311e80..9b1129bb7ece2c868316584d12805168dbbea017 100644 (file)
@@ -625,7 +625,7 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
        newinet->daddr = newinet->saddr = newinet->rcv_saddr = LOOPBACK4_IPV6;
 
        __inet6_hash(newsk);
-       inet_inherit_port(sk, newsk);
+       __inet_inherit_port(sk, newsk);
 
        return newsk;
 
index 231c4dddfb8cc7d44441e5459ef2edb324488c54..715965f0fac0b19a862462a8eb8188ab965033b7 100644 (file)
@@ -1534,7 +1534,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
 #endif
 
        __inet6_hash(newsk);
-       inet_inherit_port(sk, newsk);
+       __inet_inherit_port(sk, newsk);
 
        return newsk;