mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Cc: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1abd727ed7
commit
1800782016
1 changed files with 1 additions and 1 deletions
|
|
@ -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++;
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue