From: Akinobu Mita Date: Sun, 6 May 2007 21:49:52 +0000 (-0700) Subject: slob: handle SLAB_PANIC flag X-Git-Tag: v2.6.22-rc1~950 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0055aee40ba40627361d8ffd8530d315920f18;p=linux-2.6 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 --- diff --git a/mm/slob.c b/mm/slob.c index 03cce3d3d9..77786be032 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; }