]> Pileus Git - ~andy/linux/blobdiff - mm/page_alloc.c
Merge branch 'akpm' (incoming fixes from Andrew)
[~andy/linux] / mm / page_alloc.c
index ece7b8e8a5b668e39555195f3402ed8ed0ef3274..df2022ff0c8a1d9fb7ff13ed4cf88058999485e6 100644 (file)
@@ -5585,7 +5585,7 @@ static inline int pfn_to_bitidx(struct zone *zone, unsigned long pfn)
        pfn &= (PAGES_PER_SECTION-1);
        return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS;
 #else
-       pfn = pfn - zone->zone_start_pfn;
+       pfn = pfn - round_down(zone->zone_start_pfn, pageblock_nr_pages);
        return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS;
 #endif /* CONFIG_SPARSEMEM */
 }