aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_hashtables.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-06-16 20:12:49 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-16 20:12:49 -0400
commit7f635ab71eef8da012320c0092b662d6af8c1e69 (patch)
tree21e4af155dbbc1f059b8af0281fdfbc0fb207084 /include/net/inet_hashtables.h
parent19c7578fb22b0aef103222cae9b522f03ae489d6 (diff)
inet: add struct net argument to inet_bhashfn
Binding to some port in many namespaces may create too long chains in bhash-es, so prepare the hashfn 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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 735b926a3497..61dd3317089c 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -201,7 +201,8 @@ extern struct inet_bind_bucket *
201extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 201extern void inet_bind_bucket_destroy(struct kmem_cache *cachep,
202 struct inet_bind_bucket *tb); 202 struct inet_bind_bucket *tb);
203 203
204static inline int inet_bhashfn(const __u16 lport, const int bhash_size) 204static inline int inet_bhashfn(struct net *net,
205 const __u16 lport, const int bhash_size)
205{ 206{
206 return lport & (bhash_size - 1); 207 return lport & (bhash_size - 1);
207} 208}