diff options
Diffstat (limited to 'mm/sparse.c')
-rw-r--r-- | mm/sparse.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 7b4be3fd5cac..a9783acf2bb9 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -65,14 +65,10 @@ static noinline struct mem_section __ref *sparse_index_alloc(int nid) | |||
65 | unsigned long array_size = SECTIONS_PER_ROOT * | 65 | unsigned long array_size = SECTIONS_PER_ROOT * |
66 | sizeof(struct mem_section); | 66 | sizeof(struct mem_section); |
67 | 67 | ||
68 | if (slab_is_available()) { | 68 | if (slab_is_available()) |
69 | if (node_state(nid, N_HIGH_MEMORY)) | 69 | section = kzalloc_node(array_size, GFP_KERNEL, nid); |
70 | section = kzalloc_node(array_size, GFP_KERNEL, nid); | 70 | else |
71 | else | ||
72 | section = kzalloc(array_size, GFP_KERNEL); | ||
73 | } else { | ||
74 | section = memblock_virt_alloc_node(array_size, nid); | 71 | section = memblock_virt_alloc_node(array_size, nid); |
75 | } | ||
76 | 72 | ||
77 | return section; | 73 | return section; |
78 | } | 74 | } |