diff options
-rw-r--r-- | mm/bootmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index daf956bb4782..0a0eb62b1c92 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -173,6 +173,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) { struct page *page; unsigned long *map, start, end, pages, count = 0; + unsigned long cur; if (!bdata->node_bootmem_map) return 0; @@ -214,7 +215,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) count += BITS_PER_LONG; start += BITS_PER_LONG; } else { - unsigned long cur = start; + cur = start; start = ALIGN(start + 1, BITS_PER_LONG); while (vec && cur != start) { @@ -233,6 +234,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) pages = bdata->node_low_pfn - bdata->node_min_pfn; pages = bootmem_bootmap_pages(pages); count += pages; + cur = bdata->node_min_pfn; while (pages--) __free_pages_bootmem(page++, cur++, 0); |