mm/sl[aou]b: Use "kmem_cache" name for slab cache with kmem_cache struct
[firefly-linux-kernel-4.4.55.git] / mm / slob.c
index 289be4f4681a5218efd40f0eeade9c362c39bf6e..7d272c3dcc083263088460961b62f757c45ce68b 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -622,8 +622,16 @@ int kmem_cache_shrink(struct kmem_cache *d)
 }
 EXPORT_SYMBOL(kmem_cache_shrink);
 
+struct kmem_cache kmem_cache_boot = {
+       .name = "kmem_cache",
+       .size = sizeof(struct kmem_cache),
+       .flags = SLAB_PANIC,
+       .align = ARCH_KMALLOC_MINALIGN,
+};
+
 void __init kmem_cache_init(void)
 {
+       kmem_cache = &kmem_cache_boot;
        slab_state = UP;
 }