slub: don't confuse ctor and dtor
authorHugh Dickins <hugh@veritas.com>
Wed, 16 May 2007 06:57:04 +0000 (23:57 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 17 May 2007 04:19:15 +0000 (21:19 -0700)
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 <hugh@veritas.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c

index b39c8a69a4ff4f79faecc51b6d8cfeaabf707754..5e3e8bc9838f8f30eb7a383447356e436737623c 100644 (file)
--- 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);
        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++;
                /*
        if (s) {
                s->refcount++;
                /*