* Initialize the caches that provide memory for the  kmem_cache_node
         * structures first.  Without this, further allocations will bug.
         */
-       kmalloc_caches[KMALLOC_NORMAL][INDEX_NODE] = create_kmalloc_cache(
-                               kmalloc_info[INDEX_NODE].name[KMALLOC_NORMAL],
-                               kmalloc_info[INDEX_NODE].size,
-                               ARCH_KMALLOC_FLAGS, 0,
-                               kmalloc_info[INDEX_NODE].size);
+       new_kmalloc_cache(INDEX_NODE, KMALLOC_NORMAL, ARCH_KMALLOC_FLAGS);
        slab_state = PARTIAL_NODE;
        setup_kmalloc_cache_index_table();
 
 
 /* Functions provided by the slab allocators */
 int __kmem_cache_create(struct kmem_cache *, slab_flags_t flags);
 
-struct kmem_cache *create_kmalloc_cache(const char *name, unsigned int size,
-                       slab_flags_t flags, unsigned int useroffset,
-                       unsigned int usersize);
+void __init new_kmalloc_cache(int idx, enum kmalloc_cache_type type,
+                             slab_flags_t flags);
 extern void create_boot_cache(struct kmem_cache *, const char *name,
                        unsigned int size, slab_flags_t flags,
                        unsigned int useroffset, unsigned int usersize);
 
        s->refcount = -1;       /* Exempt from merging for now */
 }
 
-struct kmem_cache *__init create_kmalloc_cache(const char *name,
-               unsigned int size, slab_flags_t flags,
-               unsigned int useroffset, unsigned int usersize)
+static struct kmem_cache *__init create_kmalloc_cache(const char *name,
+                                                     unsigned int size,
+                                                     slab_flags_t flags)
 {
        struct kmem_cache *s = kmem_cache_zalloc(kmem_cache, GFP_NOWAIT);
 
        if (!s)
                panic("Out of memory when creating slab %s\n", name);
 
-       create_boot_cache(s, name, size, flags | SLAB_KMALLOC, useroffset,
-                                                               usersize);
+       create_boot_cache(s, name, size, flags | SLAB_KMALLOC, 0, size);
        list_add(&s->list, &slab_caches);
        s->refcount = 1;
        return s;
        }
 }
 
-static void __init
+void __init
 new_kmalloc_cache(int idx, enum kmalloc_cache_type type, slab_flags_t flags)
 {
        if ((KMALLOC_RECLAIM != KMALLOC_NORMAL) && (type == KMALLOC_RECLAIM)) {
 
        kmalloc_caches[type][idx] = create_kmalloc_cache(
                                        kmalloc_info[idx].name[type],
-                                       kmalloc_info[idx].size, flags, 0,
-                                       kmalloc_info[idx].size);
+                                       kmalloc_info[idx].size, flags);
 
        /*
         * If CONFIG_MEMCG_KMEM is enabled, disable cache merging for