aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 3e5aefcb4075..238c5a6ee896 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2435,6 +2435,7 @@ void __init kmem_cache_init(void)
2435 */ 2435 */
2436 create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node", 2436 create_kmalloc_cache(&kmalloc_caches[0], "kmem_cache_node",
2437 sizeof(struct kmem_cache_node), GFP_KERNEL); 2437 sizeof(struct kmem_cache_node), GFP_KERNEL);
2438 kmalloc_caches[0].refcount = -1;
2438#endif 2439#endif
2439 2440
2440 /* Able to allocate the per node structures */ 2441 /* Able to allocate the per node structures */
@@ -2482,6 +2483,12 @@ static int slab_unmergeable(struct kmem_cache *s)
2482 if (s->ctor) 2483 if (s->ctor)
2483 return 1; 2484 return 1;
2484 2485
2486 /*
2487 * We may have set a slab to be unmergeable during bootstrap.
2488 */
2489 if (s->refcount < 0)
2490 return 1;
2491
2485 return 0; 2492 return 0;
2486} 2493}
2487 2494