tcp/dccp: remove BH disable/enable in lookup
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>
This commit is contained in:
Родитель
ca065d0cf8
Коммит
ee3cf32a4a
|
@ -280,11 +280,8 @@ static inline struct sock *inet_lookup_listener(struct net *net,
|
||||||
net_eq(sock_net(__sk), (__net)))
|
net_eq(sock_net(__sk), (__net)))
|
||||||
#endif /* 64-bit arch */
|
#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
|
* not check it for lookups anymore, thanks Alexey. -DaveM
|
||||||
*
|
|
||||||
* Local BH must be disabled here.
|
|
||||||
*/
|
*/
|
||||||
struct sock *__inet_lookup_established(struct net *net,
|
struct sock *__inet_lookup_established(struct net *net,
|
||||||
struct inet_hashinfo *hashinfo,
|
struct inet_hashinfo *hashinfo,
|
||||||
|
@ -326,10 +323,8 @@ static inline struct sock *inet_lookup(struct net *net,
|
||||||
{
|
{
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
local_bh_disable();
|
|
||||||
sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
|
sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
|
||||||
dport, dif);
|
dport, dif);
|
||||||
local_bh_enable();
|
|
||||||
|
|
||||||
return sk;
|
return sk;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,10 +200,8 @@ struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
|
||||||
{
|
{
|
||||||
struct sock *sk;
|
struct sock *sk;
|
||||||
|
|
||||||
local_bh_disable();
|
|
||||||
sk = __inet6_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
|
sk = __inet6_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
|
||||||
ntohs(dport), dif);
|
ntohs(dport), dif);
|
||||||
local_bh_enable();
|
|
||||||
|
|
||||||
return sk;
|
return sk;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче