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>
This commit is contained in:
parent
b5430a04e9
commit
74dbdd239b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue