提交 bc0055ae 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

slob: handle SLAB_PANIC flag

kmem_cache_create() for slob doesn't handle SLAB_PANIC.
Signed-off-by: NMatt Mackall <mpm@selenic.com>
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 3a2cba99
...@@ -298,7 +298,8 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, ...@@ -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; c->align = (flags & SLAB_MUST_HWCACHE_ALIGN) ? SLOB_ALIGN : 0;
if (c->align < align) if (c->align < align)
c->align = align; c->align = align;
} } else if (flags & SLAB_PANIC)
panic("Cannot create slab cache %s\n", name);
return c; return c;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册