diff options
Diffstat (limited to 'mm/sparse-vmemmap.c')
-rw-r--r-- | mm/sparse-vmemmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 68bb65b2d34d..95e2c7638a5c 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c | |||
@@ -281,6 +281,7 @@ void __init sparse_mem_maps_populate_node(struct page **map_map, | |||
281 | unsigned long pnum; | 281 | unsigned long pnum; |
282 | unsigned long size = sizeof(struct page) * PAGES_PER_SECTION; | 282 | unsigned long size = sizeof(struct page) * PAGES_PER_SECTION; |
283 | void *vmemmap_buf_start; | 283 | void *vmemmap_buf_start; |
284 | int nr_consumed_maps = 0; | ||
284 | 285 | ||
285 | size = ALIGN(size, PMD_SIZE); | 286 | size = ALIGN(size, PMD_SIZE); |
286 | vmemmap_buf_start = __earlyonly_bootmem_alloc(nodeid, size * map_count, | 287 | vmemmap_buf_start = __earlyonly_bootmem_alloc(nodeid, size * map_count, |
@@ -295,8 +296,9 @@ void __init sparse_mem_maps_populate_node(struct page **map_map, | |||
295 | if (!present_section_nr(pnum)) | 296 | if (!present_section_nr(pnum)) |
296 | continue; | 297 | continue; |
297 | 298 | ||
298 | map_map[pnum] = sparse_mem_map_populate(pnum, nodeid, NULL); | 299 | map_map[nr_consumed_maps] = |
299 | if (map_map[pnum]) | 300 | sparse_mem_map_populate(pnum, nodeid, NULL); |
301 | if (map_map[nr_consumed_maps++]) | ||
300 | continue; | 302 | continue; |
301 | pr_err("%s: sparsemem memory map backing failed some memory will not be available\n", | 303 | pr_err("%s: sparsemem memory map backing failed some memory will not be available\n", |
302 | __func__); | 304 | __func__); |