提交 74dbdd23 编写于 作者: A Andrea Arcangeli 提交者: Linus Torvalds

mm: hugetlb: fix clear_huge_page()

sz is in bytes, MAX_ORDER_NR_PAGES is in pages.
Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com>
Acked-by: NDavid 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b5430a04
...@@ -402,7 +402,7 @@ static void clear_huge_page(struct page *page, ...@@ -402,7 +402,7 @@ static void clear_huge_page(struct page *page,
{ {
int i; int i;
if (unlikely(sz > MAX_ORDER_NR_PAGES)) { if (unlikely(sz/PAGE_SIZE > MAX_ORDER_NR_PAGES)) {
clear_gigantic_page(page, addr, sz); clear_gigantic_page(page, addr, sz);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册