aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorVladimir Davydov <vdavydov@parallels.com>2014-01-02 15:58:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 15:24:24 -0500
commit76fca2297af40a10ec000ecb08cac41b51fbccc9 (patch)
treeb263d57145b08d3735fe8cc98cf7a7999afcc26d /mm
parent8553459e73c6da3e5b9da9239dd8ef017181252a (diff)
memcg: fix memcg_size() calculation
commit 695c60830764945cf61a2cc623eb1392d137223e upstream. The mem_cgroup structure contains nr_node_ids pointers to mem_cgroup_per_node objects, not the objects themselves. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Glauber Costa <glommer@openvz.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Balbir Singh <bsingharora@gmail.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 905ce72c8c4e..134e2106f467 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -379,7 +379,7 @@ struct mem_cgroup {
379static size_t memcg_size(void) 379static size_t memcg_size(void)
380{ 380{
381 return sizeof(struct mem_cgroup) + 381 return sizeof(struct mem_cgroup) +
382 nr_node_ids * sizeof(struct mem_cgroup_per_node); 382 nr_node_ids * sizeof(struct mem_cgroup_per_node *);
383} 383}
384 384
385/* internal only representation about the status of kmem accounting. */ 385/* internal only representation about the status of kmem accounting. */