aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 6e1e4cf65836..f8899eedab68 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -116,7 +116,7 @@ static int memcg_alloc_cache_params(struct mem_cgroup *memcg,
116 116
117 if (!memcg) { 117 if (!memcg) {
118 size = offsetof(struct memcg_cache_params, memcg_caches); 118 size = offsetof(struct memcg_cache_params, memcg_caches);
119 size += memcg_limited_groups_array_size * sizeof(void *); 119 size += memcg_nr_cache_ids * sizeof(void *);
120 } else 120 } else
121 size = sizeof(struct memcg_cache_params); 121 size = sizeof(struct memcg_cache_params);
122 122
@@ -154,7 +154,7 @@ static int memcg_update_cache_params(struct kmem_cache *s, int num_memcgs)
154 154
155 cur_params = s->memcg_params; 155 cur_params = s->memcg_params;
156 memcpy(new_params->memcg_caches, cur_params->memcg_caches, 156 memcpy(new_params->memcg_caches, cur_params->memcg_caches,
157 memcg_limited_groups_array_size * sizeof(void *)); 157 memcg_nr_cache_ids * sizeof(void *));
158 158
159 new_params->is_root_cache = true; 159 new_params->is_root_cache = true;
160 160