tcp/dccp: remove BH disable/enable in lookup
authorEric Dumazet <edumazet@google.com>
Fri, 1 Apr 2016 15:52:14 +0000 (08:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Apr 2016 02:11:19 +0000 (22:11 -0400)
Since linux 2.6.29, lookups only use rcu locking.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
net/ipv6/inet6_hashtables.c

index 50f635c2c53651f0bbfe9937dea15215e88350bb..a77acee93aaf4685f5724c8b345cbe34edd0ac2f 100644 (file)
@@ -280,11 +280,8 @@ static inline struct sock *inet_lookup_listener(struct net *net,
         net_eq(sock_net(__sk), (__net)))
 #endif /* 64-bit arch */
 
-/*
- * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need
+/* Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need
  * not check it for lookups anymore, thanks Alexey. -DaveM
- *
- * Local BH must be disabled here.
  */
 struct sock *__inet_lookup_established(struct net *net,
                                       struct inet_hashinfo *hashinfo,
@@ -326,10 +323,8 @@ static inline struct sock *inet_lookup(struct net *net,
 {
        struct sock *sk;
 
-       local_bh_disable();
        sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
                           dport, dif);
-       local_bh_enable();
 
        return sk;
 }
index 70f2628be6faccb0bf311f8c36e6db9242117047..d253f32874c9034e2bd060e920175f45437e2732 100644 (file)
@@ -200,10 +200,8 @@ struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
 {
        struct sock *sk;
 
-       local_bh_disable();
        sk = __inet6_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
                            ntohs(dport), dif);
-       local_bh_enable();
 
        return sk;
 }
This page took 0.028028 seconds and 5 git commands to generate.