diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2014-01-02 15:58:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-02 17:40:30 -0500 |
commit | 695c60830764945cf61a2cc623eb1392d137223e (patch) | |
tree | 97f7bbab507ceed1e3716ef2c8f418f7c90c30d1 /mm | |
parent | 4eb919825e6c3c7fb3630d5621f6d11e98a18b3a (diff) |
memcg: fix memcg_size() calculation
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index bf5e89457149..7f1a356153c0 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -338,7 +338,7 @@ struct mem_cgroup { | |||
338 | static size_t memcg_size(void) | 338 | static size_t memcg_size(void) |
339 | { | 339 | { |
340 | return sizeof(struct mem_cgroup) + | 340 | return sizeof(struct mem_cgroup) + |
341 | nr_node_ids * sizeof(struct mem_cgroup_per_node); | 341 | nr_node_ids * sizeof(struct mem_cgroup_per_node *); |
342 | } | 342 | } |
343 | 343 | ||
344 | /* internal only representation about the status of kmem accounting. */ | 344 | /* internal only representation about the status of kmem accounting. */ |