|
@@ -1081,15 +1081,16 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
|
|
return 0;
|
|
|
} else if (PageHuge(hpage)) {
|
|
|
/*
|
|
|
- * Check "just unpoisoned", "filter hit", and
|
|
|
- * "race with other subpage."
|
|
|
+ * Check "filter hit" and "race with other subpage."
|
|
|
*/
|
|
|
lock_page(hpage);
|
|
|
- if (!PageHWPoison(hpage)
|
|
|
- || (hwpoison_filter(p) && TestClearPageHWPoison(p))
|
|
|
- || (p != hpage && TestSetPageHWPoison(hpage))) {
|
|
|
- atomic_long_sub(nr_pages, &num_poisoned_pages);
|
|
|
- return 0;
|
|
|
+ if (PageHWPoison(hpage)) {
|
|
|
+ if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
|
|
|
+ || (p != hpage && TestSetPageHWPoison(hpage))) {
|
|
|
+ atomic_long_sub(nr_pages, &num_poisoned_pages);
|
|
|
+ unlock_page(hpage);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
}
|
|
|
set_page_hwpoison_huge_page(hpage);
|
|
|
res = dequeue_hwpoisoned_huge_page(hpage);
|
|
@@ -1152,6 +1153,8 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
|
|
|
*/
|
|
|
if (!PageHWPoison(p)) {
|
|
|
printk(KERN_ERR "MCE %#lx: just unpoisoned\n", pfn);
|
|
|
+ atomic_long_sub(nr_pages, &num_poisoned_pages);
|
|
|
+ put_page(hpage);
|
|
|
res = 0;
|
|
|
goto out;
|
|
|
}
|