Skip to content

Commit ee3cf32

Browse files
Eric Dumazetdavem330
authored andcommitted
tcp/dccp: remove BH disable/enable in lookup
Since linux 2.6.29, lookups only use rcu locking. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ca065d0 commit ee3cf32

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

include/net/inet_hashtables.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,8 @@ static inline struct sock *inet_lookup_listener(struct net *net,
280280
net_eq(sock_net(__sk), (__net)))
281281
#endif /* 64-bit arch */
282282

283-
/*
284-
* Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need
283+
/* Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need
285284
* not check it for lookups anymore, thanks Alexey. -DaveM
286-
*
287-
* Local BH must be disabled here.
288285
*/
289286
struct sock *__inet_lookup_established(struct net *net,
290287
struct inet_hashinfo *hashinfo,
@@ -326,10 +323,8 @@ static inline struct sock *inet_lookup(struct net *net,
326323
{
327324
struct sock *sk;
328325

329-
local_bh_disable();
330326
sk = __inet_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
331327
dport, dif);
332-
local_bh_enable();
333328

334329
return sk;
335330
}

net/ipv6/inet6_hashtables.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,8 @@ struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
200200
{
201201
struct sock *sk;
202202

203-
local_bh_disable();
204203
sk = __inet6_lookup(net, hashinfo, skb, doff, saddr, sport, daddr,
205204
ntohs(dport), dif);
206-
local_bh_enable();
207205

208206
return sk;
209207
}

0 commit comments

Comments
 (0)