]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
memcg-reduce-the-size-of-struct-memcg-244-fold-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:14:44 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:49 +0000 (16:52 +1100)
add check for invalid nid, remove inline

Cc: Glauber Costa <glommer@parallels.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c

index 7e760c65425a5506a8dacc534fdcc45d878d38b0..9e94bbbd3a6772f66a9b919790cfb267e2de4f5f 100644 (file)
@@ -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];
 }