Commit 5fcef9cb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] use SLAB_PANIC for general caches

From: Brian Gerst <bgerst@didntduck.org>

Initialize the general caches using SLAB_PANIC instead of BUG().
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e96b07be
...@@ -754,11 +754,9 @@ void __init kmem_cache_init(void) ...@@ -754,11 +754,9 @@ void __init kmem_cache_init(void)
* eliminates "false sharing". * eliminates "false sharing".
* Note for systems short on memory removing the alignment will * Note for systems short on memory removing the alignment will
* allow tighter packing of the smaller caches. */ * allow tighter packing of the smaller caches. */
sizes->cs_cachep = kmem_cache_create( sizes->cs_cachep = kmem_cache_create(names->name,
names->name, sizes->cs_size, sizes->cs_size, ARCH_KMALLOC_MINALIGN,
ARCH_KMALLOC_MINALIGN, 0, NULL, NULL); SLAB_PANIC, NULL, NULL);
if (!sizes->cs_cachep)
BUG();
/* Inc off-slab bufctl limit until the ceiling is hit. */ /* Inc off-slab bufctl limit until the ceiling is hit. */
if (!(OFF_SLAB(sizes->cs_cachep))) { if (!(OFF_SLAB(sizes->cs_cachep))) {
...@@ -766,11 +764,9 @@ void __init kmem_cache_init(void) ...@@ -766,11 +764,9 @@ void __init kmem_cache_init(void)
offslab_limit /= sizeof(kmem_bufctl_t); offslab_limit /= sizeof(kmem_bufctl_t);
} }
sizes->cs_dmacachep = kmem_cache_create( sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
names->name_dma, sizes->cs_size, sizes->cs_size, ARCH_KMALLOC_MINALIGN,
ARCH_KMALLOC_MINALIGN, SLAB_CACHE_DMA, NULL, NULL); (SLAB_CACHE_DMA | SLAB_PANIC), NULL, NULL);
if (!sizes->cs_dmacachep)
BUG();
sizes++; sizes++;
names++; names++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment