diff options
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r-- | net/ipv4/fib_hash.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c index 258214f57fba..499522f3b305 100644 --- a/net/ipv4/fib_hash.c +++ b/net/ipv4/fib_hash.c | |||
@@ -747,21 +747,19 @@ static int fn_hash_dump(struct fib_table *tb, struct sk_buff *skb, struct netlin | |||
747 | return skb->len; | 747 | return skb->len; |
748 | } | 748 | } |
749 | 749 | ||
750 | struct fib_table *fib_hash_init(u32 id) | 750 | void __init fib_hash_init(void) |
751 | { | 751 | { |
752 | struct fib_table *tb; | 752 | fn_hash_kmem = kmem_cache_create("ip_fib_hash", sizeof(struct fib_node), |
753 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | ||
754 | |||
755 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", sizeof(struct fib_alias), | ||
756 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | ||
757 | |||
758 | } | ||
753 | 759 | ||
754 | if (fn_hash_kmem == NULL) | 760 | struct fib_table *fib_hash_table(u32 id) |
755 | fn_hash_kmem = kmem_cache_create("ip_fib_hash", | 761 | { |
756 | sizeof(struct fib_node), | 762 | struct fib_table *tb; |
757 | 0, SLAB_HWCACHE_ALIGN, | ||
758 | NULL); | ||
759 | |||
760 | if (fn_alias_kmem == NULL) | ||
761 | fn_alias_kmem = kmem_cache_create("ip_fib_alias", | ||
762 | sizeof(struct fib_alias), | ||
763 | 0, SLAB_HWCACHE_ALIGN, | ||
764 | NULL); | ||
765 | 763 | ||
766 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), | 764 | tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), |
767 | GFP_KERNEL); | 765 | GFP_KERNEL); |