diff options
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 1ec3c619ba04..e77b51eb7347 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -200,9 +200,11 @@ kmem_cache_create_memcg(struct mem_cgroup *memcg, const char *name, size_t size, */ flags &= CACHE_CREATE_MASK; - s = __kmem_cache_alias(memcg, name, size, align, flags, ctor); - if (s) - goto out_unlock; + if (!memcg) { + s = __kmem_cache_alias(name, size, align, flags, ctor); + if (s) + goto out_unlock; + } err = -ENOMEM; s = kmem_cache_zalloc(kmem_cache, GFP_KERNEL); |