From bc0055aee40ba40627361d8ffd8530d315920f18 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Sun, 6 May 2007 14:49:52 -0700 Subject: slob: handle SLAB_PANIC flag kmem_cache_create() for slob doesn't handle SLAB_PANIC. Signed-off-by: Matt Mackall Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/slob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mm/slob.c') diff --git a/mm/slob.c b/mm/slob.c index 03cce3d3d986..77786be032e0 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -298,7 +298,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, c->align = (flags & SLAB_MUST_HWCACHE_ALIGN) ? SLOB_ALIGN : 0; if (c->align < align) c->align = align; - } + } else if (flags & SLAB_PANIC) + panic("Cannot create slab cache %s\n", name); return c; } -- cgit v1.2.3