Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18007820 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

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: default avatarHugh Dickins <hugh@veritas.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1abd727e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;
		/*