aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-28 20:58:02 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-28 20:58:02 -0700
commit5fcef9cb18491ecec8d8da2663e15a9a787d618d (patch)
tree19093bde06f04a211017f01d97aaf8bf33d68fa6 /mm
parente96b07be6878caf421ecf89a5ce9d92766f9b6a5 (diff)
downloadhistory-5fcef9cb18491ecec8d8da2663e15a9a787d618d.tar.gz
[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: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 3d6ccd50a96bfe..7ac848cee87318 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -754,11 +754,9 @@ void __init kmem_cache_init(void)
* eliminates "false sharing".
* Note for systems short on memory removing the alignment will
* allow tighter packing of the smaller caches. */
- sizes->cs_cachep = kmem_cache_create(
- names->name, sizes->cs_size,
- ARCH_KMALLOC_MINALIGN, 0, NULL, NULL);
- if (!sizes->cs_cachep)
- BUG();
+ sizes->cs_cachep = kmem_cache_create(names->name,
+ sizes->cs_size, ARCH_KMALLOC_MINALIGN,
+ SLAB_PANIC, NULL, NULL);
/* Inc off-slab bufctl limit until the ceiling is hit. */
if (!(OFF_SLAB(sizes->cs_cachep))) {
@@ -766,11 +764,9 @@ void __init kmem_cache_init(void)
offslab_limit /= sizeof(kmem_bufctl_t);
}
- sizes->cs_dmacachep = kmem_cache_create(
- names->name_dma, sizes->cs_size,
- ARCH_KMALLOC_MINALIGN, SLAB_CACHE_DMA, NULL, NULL);
- if (!sizes->cs_dmacachep)
- BUG();
+ sizes->cs_dmacachep = kmem_cache_create(names->name_dma,
+ sizes->cs_size, ARCH_KMALLOC_MINALIGN,
+ (SLAB_CACHE_DMA | SLAB_PANIC), NULL, NULL);
sizes++;
names++;