mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
19c7578fb2
commit
7f635ab71e
4 changed files with 17 additions and 9 deletions
|
|
@ -201,7 +201,8 @@ extern struct inet_bind_bucket *
|
|||
extern void inet_bind_bucket_destroy(struct kmem_cache *cachep,
|
||||
struct inet_bind_bucket *tb);
|
||||
|
||||
static inline int inet_bhashfn(const __u16 lport, const int bhash_size)
|
||||
static inline int inet_bhashfn(struct net *net,
|
||||
const __u16 lport, const int bhash_size)
|
||||
{
|
||||
return lport & (bhash_size - 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue