diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 5286945470b9..553b0705dce8 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1263,7 +1263,7 @@ static int scan_movable_pages(unsigned long start, unsigned long end, head = compound_head(page); if (page_huge_active(head)) goto found; - skip = compound_nr(head) - (page - head); + skip = compound_nr(head) - (pfn - page_to_pfn(head)); pfn += skip - 1; } return -ENOENT;