aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index bf629ac08b87..ad8e320ceba7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -79,6 +79,7 @@
79#include <linux/cpu.h> 79#include <linux/cpu.h>
80#include <linux/types.h> 80#include <linux/types.h>
81#include <linux/kernel.h> 81#include <linux/kernel.h>
82#include <linux/hash.h>
82#include <linux/sched.h> 83#include <linux/sched.h>
83#include <linux/mutex.h> 84#include <linux/mutex.h>
84#include <linux/string.h> 85#include <linux/string.h>
@@ -196,7 +197,7 @@ EXPORT_SYMBOL(dev_base_lock);
196static inline struct hlist_head *dev_name_hash(struct net *net, const char *name) 197static inline struct hlist_head *dev_name_hash(struct net *net, const char *name)
197{ 198{
198 unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); 199 unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ));
199 return &net->dev_name_head[hash & (NETDEV_HASHENTRIES - 1)]; 200 return &net->dev_name_head[hash_32(hash, NETDEV_HASHBITS)];
200} 201}
201 202
202static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex) 203static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)