blk-throttle: Fix that bps of child could exceed bps limited in parent
[linux-2.6-microblaze.git] / mm / memblock.c
index b5d3026..511d478 100644 (file)
@@ -2000,7 +2000,7 @@ static void __init free_unused_memmap(void)
                 * presume that there are no holes in the memory map inside
                 * a pageblock
                 */
-               start = round_down(start, pageblock_nr_pages);
+               start = pageblock_start_pfn(start);
 
                /*
                 * If we had a previous bank, and there is a space
@@ -2014,12 +2014,12 @@ static void __init free_unused_memmap(void)
                 * presume that there are no holes in the memory map inside
                 * a pageblock
                 */
-               prev_end = ALIGN(end, pageblock_nr_pages);
+               prev_end = pageblock_align(end);
        }
 
 #ifdef CONFIG_SPARSEMEM
        if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION)) {
-               prev_end = ALIGN(end, pageblock_nr_pages);
+               prev_end = pageblock_align(end);
                free_memmap(prev_end, ALIGN(prev_end, PAGES_PER_SECTION));
        }
 #endif