1
0
Fork 0

mm: hugetlb: fix clear_huge_page()

sz is in bytes, MAX_ORDER_NR_PAGES is in pages.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: David 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Andrea Arcangeli 2010-01-08 14:43:05 -08:00 committed by Linus Torvalds
parent b5430a04e9
commit 74dbdd239b
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}