From b683230ae04f0666b3342f8c77c66d8f0387205b Mon Sep 17 00:00:00 2001 From: Gavin Shan Date: Tue, 31 Jul 2012 16:46:02 -0700 Subject: [PATCH] --- yaml --- r: 320860 b: refs/heads/master c: 5b760e64a64c8940cdccd0ba6fce19a9bd010d20 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/sparse.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index c0fa20cd6aac..230201d9f8ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b214514592d2dcb0b9d14ee8dd14f3699e3b0a84 +refs/heads/master: 5b760e64a64c8940cdccd0ba6fce19a9bd010d20 diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 950981fd07c5..fa933f43b2c9 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -65,14 +65,12 @@ static struct mem_section noinline __init_refok *sparse_index_alloc(int nid) if (slab_is_available()) { if (node_state(nid, N_HIGH_MEMORY)) - section = kmalloc_node(array_size, GFP_KERNEL, nid); + section = kzalloc_node(array_size, GFP_KERNEL, nid); else - section = kmalloc(array_size, GFP_KERNEL); - } else + section = kzalloc(array_size, GFP_KERNEL); + } else { section = alloc_bootmem_node(NODE_DATA(nid), array_size); - - if (section) - memset(section, 0, array_size); + } return section; }