summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>2010-09-08 10:19:40 +0900
committerAndi Kleen <ak@linux.intel.com>2010-10-08 09:32:45 +0200
commit6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30 (patch)
tree4dafdd7c0e0b2df7b660de650b1d8201f143b560
parentd950b95882f3dc47e86f1496cd3f7fef540d6d6b (diff)
downloadop-kernel-dev-6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30.zip
op-kernel-dev-6a90181c7b0558b86179c1f5bcf3ab11f9d1bd30.tar.gz
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 74eb425..14589a2 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -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);
OpenPOWER on IntegriCloud