aboutsummaryrefslogtreecommitdiff
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2012-09-05 00:18:32 +0000
committerPekka Enberg <penberg@kernel.org>2012-09-05 12:00:36 +0300
commitcbb79694d592e9a76880f6ef6db8feccaeee1c32 (patch)
tree6eb60a253bfde73214d4dc07bed860f17f737537 /mm/slab_common.c
parentdb265eca77000c5dafc5608975afe8dafb2a02d5 (diff)
mm/sl[aou]b: Do slab aliasing call from common code
The slab aliasing logic causes some strange contortions in slub. So add a call to deal with aliases to slab_common.c but disable it for other slab allocators by providng stubs that fail to create aliases. Full general support for aliases will require additional cleanup passes and more standardization of fields in kmem_cache. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index f18c06fd97c..adc42b01b25 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -115,6 +115,10 @@ struct kmem_cache *kmem_cache_create(const char *name, size_t size, size_t align
goto out_locked;
}
+ s = __kmem_cache_alias(name, size, align, flags, ctor);
+ if (s)
+ goto out_locked;
+
s = __kmem_cache_create(n, size, align, flags, ctor);
if (s) {