diff options
author | Hugh Dickins <hugh@veritas.com> | 2007-05-16 02:57:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-17 00:19:15 -0400 |
commit | 1800782016fda6fbc9990a0227fec581070f23af (patch) | |
tree | b920bd8d09b9ca5bed90ad4888044067b86053b4 | |
parent | 1abd727ed7abf5c19e7d1760671475cbecbccb0e (diff) |
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 <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>
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2522,7 +2522,7 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, | |||
2522 | struct kmem_cache *s; | 2522 | struct kmem_cache *s; |
2523 | 2523 | ||
2524 | down_write(&slub_lock); | 2524 | down_write(&slub_lock); |
2525 | s = find_mergeable(size, align, flags, dtor, ctor); | 2525 | s = find_mergeable(size, align, flags, ctor, dtor); |
2526 | if (s) { | 2526 | if (s) { |
2527 | s->refcount++; | 2527 | s->refcount++; |
2528 | /* | 2528 | /* |