summaryrefslogtreecommitdiff
path: root/mm/slab_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 989784bd88be..6087b1f9a385 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -488,6 +488,7 @@ void memcg_create_kmem_cache(struct mem_cgroup *memcg,
struct kmem_cache *root_cache)
{
static char memcg_name_buf[NAME_MAX + 1]; /* protected by slab_mutex */
+ struct cgroup_subsys_state *css = mem_cgroup_css(memcg);
struct memcg_cache_array *arr;
struct kmem_cache *s = NULL;
char *cache_name;
@@ -510,10 +511,9 @@ void memcg_create_kmem_cache(struct mem_cgroup *memcg,
if (arr->entries[idx])
goto out_unlock;
- cgroup_name(mem_cgroup_css(memcg)->cgroup,
- memcg_name_buf, sizeof(memcg_name_buf));
+ cgroup_name(css->cgroup, memcg_name_buf, sizeof(memcg_name_buf));
cache_name = kasprintf(GFP_KERNEL, "%s(%d:%s)", root_cache->name,
- idx, memcg_name_buf);
+ css->id, memcg_name_buf);
if (!cache_name)
goto out_unlock;