mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
memcg: fix memcg_size() calculation
commit 695c608307 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8553459e73
commit
76fca2297a
@@ -379,7 +379,7 @@ struct mem_cgroup {
|
|||||||
static size_t memcg_size(void)
|
static size_t memcg_size(void)
|
||||||
{
|
{
|
||||||
return sizeof(struct mem_cgroup) +
|
return sizeof(struct mem_cgroup) +
|
||||||
nr_node_ids * sizeof(struct mem_cgroup_per_node);
|
nr_node_ids * sizeof(struct mem_cgroup_per_node *);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* internal only representation about the status of kmem accounting. */
|
/* internal only representation about the status of kmem accounting. */
|
||||||
|
|||||||
Reference in New Issue
Block a user