diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/neighbour.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index ca2a1533138a..f7de8f24d8dd 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/rtnetlink.h> | 33 | #include <linux/rtnetlink.h> |
34 | #include <linux/random.h> | 34 | #include <linux/random.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/log2.h> | ||
36 | 37 | ||
37 | #define NEIGH_DEBUG 1 | 38 | #define NEIGH_DEBUG 1 |
38 | 39 | ||
@@ -311,7 +312,7 @@ static void neigh_hash_grow(struct neigh_table *tbl, unsigned long new_entries) | |||
311 | 312 | ||
312 | NEIGH_CACHE_STAT_INC(tbl, hash_grows); | 313 | NEIGH_CACHE_STAT_INC(tbl, hash_grows); |
313 | 314 | ||
314 | BUG_ON(new_entries & (new_entries - 1)); | 315 | BUG_ON(!is_power_of_2(new_entries)); |
315 | new_hash = neigh_hash_alloc(new_entries); | 316 | new_hash = neigh_hash_alloc(new_entries); |
316 | if (!new_hash) | 317 | if (!new_hash) |
317 | return; | 318 | return; |