From 6693e0ab3c8610f802eedb8add1b43ab1a3ff6a7 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Feb 2013 13:14:44 +1100 Subject: [PATCH] memcg-reduce-the-size-of-struct-memcg-244-fold-fix add check for invalid nid, remove inline Cc: Glauber Costa Cc: Greg Thelen Cc: Hugh Dickins Cc: Johannes Weiner Cc: Kamezawa Hiroyuki Cc: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Ying Han Signed-off-by: Andrew Morton --- mm/memcontrol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7e760c65425a..9e94bbbd3a67 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -381,7 +381,7 @@ enum { ((1 << KMEM_ACCOUNTED_ACTIVE) | (1 << KMEM_ACCOUNTED_ACTIVATED)) #ifdef CONFIG_MEMCG_KMEM -static inline void memcg_kmem_set_active(struct mem_cgroup *memcg) +static void memcg_kmem_set_active(struct mem_cgroup *memcg) { set_bit(KMEM_ACCOUNTED_ACTIVE, &memcg->kmem_account_flags); } @@ -645,6 +645,7 @@ static void drain_all_stock_async(struct mem_cgroup *memcg); static struct mem_cgroup_per_zone * mem_cgroup_zoneinfo(struct mem_cgroup *memcg, int nid, int zid) { + VM_BUG_ON((unsigned)nid >= nr_node_ids); return &memcg->info.nodeinfo[nid]->zoneinfo[zid]; } -- 2.39.5