diff options
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r-- | mm/slab_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 70f9e249ac30..db24ec48b946 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c | |||
@@ -215,7 +215,7 @@ kmem_cache_create_memcg(struct mem_cgroup *memcg, const char *name, size_t size, | |||
215 | 215 | ||
216 | s->refcount = 1; | 216 | s->refcount = 1; |
217 | list_add(&s->list, &slab_caches); | 217 | list_add(&s->list, &slab_caches); |
218 | memcg_cache_list_add(memcg, s); | 218 | memcg_register_cache(s); |
219 | 219 | ||
220 | out_unlock: | 220 | out_unlock: |
221 | mutex_unlock(&slab_mutex); | 221 | mutex_unlock(&slab_mutex); |
@@ -265,7 +265,8 @@ void kmem_cache_destroy(struct kmem_cache *s) | |||
265 | if (s->flags & SLAB_DESTROY_BY_RCU) | 265 | if (s->flags & SLAB_DESTROY_BY_RCU) |
266 | rcu_barrier(); | 266 | rcu_barrier(); |
267 | 267 | ||
268 | memcg_release_cache(s); | 268 | memcg_unregister_cache(s); |
269 | memcg_free_cache_params(s); | ||
269 | kfree(s->name); | 270 | kfree(s->name); |
270 | kmem_cache_free(kmem_cache, s); | 271 | kmem_cache_free(kmem_cache, s); |
271 | } else { | 272 | } else { |