Commit 74dbdd23 authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds

mm: hugetlb: fix clear_huge_page()

sz is in bytes, MAX_ORDER_NR_PAGES is in pages.
Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Acked-by: default avatarDavid Gibson <dwg@au1.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: David Rientjes <rientjes@google.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b5430a04
......@@ -402,7 +402,7 @@ static void clear_huge_page(struct page *page,
{
int i;
if (unlikely(sz > MAX_ORDER_NR_PAGES)) {
if (unlikely(sz/PAGE_SIZE > MAX_ORDER_NR_PAGES)) {
clear_gigantic_page(page, addr, sz);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment