Commit 6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30
Committed by
Andi Kleen
1 parent
d950b95882
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
mm/memory-failure.c
... | ... | @@ -1202,9 +1202,9 @@ |
1202 | 1202 | pr_debug("MCE: Software-unpoisoned page %#lx\n", pfn); |
1203 | 1203 | atomic_long_sub(nr_pages, &mce_bad_pages); |
1204 | 1204 | freeit = 1; |
1205 | + if (PageHuge(page)) | |
1206 | + clear_page_hwpoison_huge_page(page); | |
1205 | 1207 | } |
1206 | - if (PageHuge(p)) | |
1207 | - clear_page_hwpoison_huge_page(page); | |
1208 | 1208 | unlock_page(page); |
1209 | 1209 | |
1210 | 1210 | put_page(page); |