diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-06-16 20:13:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-16 20:13:08 -0400 |
commit | 2086a65078bd24682bdcf413d9c91d81988b8359 (patch) | |
tree | ff1699db9c0cc50f0c2709b74808bc8ef46168a1 /include/net/inet_hashtables.h | |
parent | 7f635ab71eef8da012320c0092b662d6af8c1e69 (diff) |
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>
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 61dd3317089c..26336cdcdc11 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -211,14 +211,14 @@ extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, | |||
211 | const unsigned short snum); | 211 | const unsigned short snum); |
212 | 212 | ||
213 | /* These can have wildcards, don't try too hard. */ | 213 | /* These can have wildcards, don't try too hard. */ |
214 | static inline int inet_lhashfn(const unsigned short num) | 214 | static inline int inet_lhashfn(struct net *net, const unsigned short num) |
215 | { | 215 | { |
216 | return num & (INET_LHTABLE_SIZE - 1); | 216 | return num & (INET_LHTABLE_SIZE - 1); |
217 | } | 217 | } |
218 | 218 | ||
219 | static inline int inet_sk_listen_hashfn(const struct sock *sk) | 219 | static inline int inet_sk_listen_hashfn(const struct sock *sk) |
220 | { | 220 | { |
221 | return inet_lhashfn(inet_sk(sk)->num); | 221 | return inet_lhashfn(sock_net(sk), inet_sk(sk)->num); |
222 | } | 222 | } |
223 | 223 | ||
224 | /* Caller must disable local BH processing. */ | 224 | /* Caller must disable local BH processing. */ |