inet: add struct net argument to inet_lhashfn
Listening-on-one-port sockets in many namespaces produce long chains in the listening_hash-es, so prepare the inet_lhashfn to take struct net into account. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7f635ab71e
commit
2086a65078
@@ -194,7 +194,7 @@ struct sock *__inet_lookup_listener(struct net *net,
|
||||
const struct hlist_head *head;
|
||||
|
||||
read_lock(&hashinfo->lhash_lock);
|
||||
head = &hashinfo->listening_hash[inet_lhashfn(hnum)];
|
||||
head = &hashinfo->listening_hash[inet_lhashfn(net, hnum)];
|
||||
if (!hlist_empty(head)) {
|
||||
const struct inet_sock *inet = inet_sk((sk = __sk_head(head)));
|
||||
|
||||
|
Reference in New Issue
Block a user