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, | |||
200 | */ | 200 | */ |
201 | flags &= CACHE_CREATE_MASK; | 201 | flags &= CACHE_CREATE_MASK; |
202 | 202 | ||
203 | s = __kmem_cache_alias(memcg, name, size, align, flags, ctor); | 203 | if (!memcg) { |
204 | if (s) | 204 | s = __kmem_cache_alias(name, size, align, flags, ctor); |
205 | goto out_unlock; | 205 | if (s) |
206 | goto out_unlock; | ||
207 | } | ||
206 | 208 | ||
207 | err = -ENOMEM; | 209 | err = -ENOMEM; |
208 | s = kmem_cache_zalloc(kmem_cache, GFP_KERNEL); | 210 | s = kmem_cache_zalloc(kmem_cache, GFP_KERNEL); |