aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 23b5fa4cabd8..2e0bfc93484b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -978,7 +978,7 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
978{ 978{
979 struct mem_cgroup_per_node *pn; 979 struct mem_cgroup_per_node *pn;
980 struct mem_cgroup_per_zone *mz; 980 struct mem_cgroup_per_zone *mz;
981 int zone; 981 int zone, tmp = node;
982 /* 982 /*
983 * This routine is called against possible nodes. 983 * This routine is called against possible nodes.
984 * But it's BUG to call kmalloc() against offline node. 984 * But it's BUG to call kmalloc() against offline node.
@@ -987,10 +987,9 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
987 * never be onlined. It's better to use memory hotplug callback 987 * never be onlined. It's better to use memory hotplug callback
988 * function. 988 * function.
989 */ 989 */
990 if (node_state(node, N_HIGH_MEMORY)) 990 if (!node_state(node, N_NORMAL_MEMORY))
991 pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, node); 991 tmp = -1;
992 else 992 pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, tmp);
993 pn = kmalloc(sizeof(*pn), GFP_KERNEL);
994 if (!pn) 993 if (!pn)
995 return 1; 994 return 1;
996 995