提交 18007820 编写于 作者: H Hugh Dickins 提交者: Linus Torvalds

slub: don't confuse ctor and dtor

kmem_cache_create() was swapping ctor and dtor in calling find_mergeable():
though it caused no bug, and probably never would, even if destructors are
retained; but fix it so as not to generate anxiety ;)
Signed-off-by: NHugh Dickins <hugh@veritas.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1abd727e
......@@ -2522,7 +2522,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size,
struct kmem_cache *s;
down_write(&slub_lock);
s = find_mergeable(size, align, flags, dtor, ctor);
s = find_mergeable(size, align, flags, ctor, dtor);
if (s) {
s->refcount++;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册