From: Andy Whitcroft Switch to using pfn_valid_within() in lumpy reclaim. Signed-off-by: Andy Whitcroft Acked-by: Mel Gorman Acked-by: Bob Picco Signed-off-by: Andrew Morton --- mm/vmscan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -puN mm/vmscan.c~lumpy-move-to-using-pfn_valid_within mm/vmscan.c --- a/mm/vmscan.c~lumpy-move-to-using-pfn_valid_within +++ a/mm/vmscan.c @@ -739,11 +739,10 @@ static unsigned long isolate_lru_pages(u /* The target page is in the block, ignore it. */ if (unlikely(pfn == page_pfn)) continue; -#ifdef CONFIG_HOLES_IN_ZONE + /* Avoid holes within the zone. */ - if (unlikely(!pfn_valid(pfn))) + if (unlikely(!pfn_valid_within(pfn))) break; -#endif cursor_page = pfn_to_page(pfn); /* Check that we have not crossed a zone boundary. */ _