From: Hugh Dickins Date: Wed, 16 May 2007 06:57:04 +0000 (-0700) Subject: slub: don't confuse ctor and dtor X-Git-Tag: v2.6.22-rc2~72 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1800782016fda6fbc9990a0227fec581070f23af;p=linux-2.6 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: Hugh Dickins Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slub.c b/mm/slub.c index b39c8a69a4..5e3e8bc983 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -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++; /*