diff options
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 35ef28acf137..9ccef39a9de2 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1081,15 +1081,16 @@ int memory_failure(unsigned long pfn, int trapno, int flags) | |||
1081 | return 0; | 1081 | return 0; |
1082 | } else if (PageHuge(hpage)) { | 1082 | } else if (PageHuge(hpage)) { |
1083 | /* | 1083 | /* |
1084 | * Check "just unpoisoned", "filter hit", and | 1084 | * Check "filter hit" and "race with other subpage." |
1085 | * "race with other subpage." | ||
1086 | */ | 1085 | */ |
1087 | lock_page(hpage); | 1086 | lock_page(hpage); |
1088 | if (!PageHWPoison(hpage) | 1087 | if (PageHWPoison(hpage)) { |
1089 | || (hwpoison_filter(p) && TestClearPageHWPoison(p)) | 1088 | if ((hwpoison_filter(p) && TestClearPageHWPoison(p)) |
1090 | || (p != hpage && TestSetPageHWPoison(hpage))) { | 1089 | || (p != hpage && TestSetPageHWPoison(hpage))) { |
1091 | atomic_long_sub(nr_pages, &num_poisoned_pages); | 1090 | atomic_long_sub(nr_pages, &num_poisoned_pages); |
1092 | return 0; | 1091 | unlock_page(hpage); |
1092 | return 0; | ||
1093 | } | ||
1093 | } | 1094 | } |
1094 | set_page_hwpoison_huge_page(hpage); | 1095 | set_page_hwpoison_huge_page(hpage); |
1095 | res = dequeue_hwpoisoned_huge_page(hpage); | 1096 | res = dequeue_hwpoisoned_huge_page(hpage); |
@@ -1152,6 +1153,8 @@ int memory_failure(unsigned long pfn, int trapno, int flags) | |||
1152 | */ | 1153 | */ |
1153 | if (!PageHWPoison(p)) { | 1154 | if (!PageHWPoison(p)) { |
1154 | printk(KERN_ERR "MCE %#lx: just unpoisoned\n", pfn); | 1155 | printk(KERN_ERR "MCE %#lx: just unpoisoned\n", pfn); |
1156 | atomic_long_sub(nr_pages, &num_poisoned_pages); | ||
1157 | put_page(hpage); | ||
1155 | res = 0; | 1158 | res = 0; |
1156 | goto out; | 1159 | goto out; |
1157 | } | 1160 | } |