diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2010-09-07 21:19:40 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-10-08 03:32:45 -0400 |
commit | 6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30 (patch) | |
tree | 4dafdd7c0e0b2df7b660de650b1d8201f143b560 | |
parent | d950b95882f3dc47e86f1496cd3f7fef540d6d6b (diff) |
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>
-rw-r--r-- | mm/memory-failure.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 74eb425010af..14589a228e97 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1202,9 +1202,9 @@ int unpoison_memory(unsigned long pfn) | |||
1202 | pr_debug("MCE: Software-unpoisoned page %#lx\n", pfn); | 1202 | pr_debug("MCE: Software-unpoisoned page %#lx\n", pfn); |
1203 | atomic_long_sub(nr_pages, &mce_bad_pages); | 1203 | atomic_long_sub(nr_pages, &mce_bad_pages); |
1204 | freeit = 1; | 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 | unlock_page(page); | 1208 | unlock_page(page); |
1209 | 1209 | ||
1210 | put_page(page); | 1210 | put_page(page); |