HWPOISON, hugetlb: fix unpoison for hugepage

Currently unpoisoning hugepages doesn't work correctly because
clearing PG_HWPoison is done outside if (TestClearPageHWPoison).
This patch fixes it.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
This commit is contained in:
Naoya Horiguchi 2010-09-08 10:19:40 +09:00 committed by Andi Kleen
parent d950b95882
commit 6a90181c7b
1 changed files with 2 additions and 2 deletions

View File

@ -1202,9 +1202,9 @@ int unpoison_memory(unsigned long pfn)
pr_debug("MCE: Software-unpoisoned page %#lx\n", pfn);
atomic_long_sub(nr_pages, &mce_bad_pages);
freeit = 1;
if (PageHuge(page))
clear_page_hwpoison_huge_page(page);
}
if (PageHuge(p))
clear_page_hwpoison_huge_page(page);
unlock_page(page);
put_page(page);