Skip to content

Commit

Permalink
slub: don't confuse ctor and dtor
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed May 17, 2007
1 parent 1abd727 commit 1800782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
/*
Expand Down

0 comments on commit 1800782

Please sign in to comment.