diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b7cd29a26c1bf822e14c428aac037ecc0e179e1c..fb74e61e5aa4d490283a3ba87031f9828df894ec 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1163,17 +1163,12 @@ static int memory_failure_hugetlb(unsigned long pfn, int flags) num_poisoned_pages_inc(); if (!(flags & MF_COUNT_INCREASED) && !get_hwpoison_page(p)) { - /* - * Check "filter hit" and "race with other subpage." - */ lock_page(head); - if (PageHWPoison(head)) { - if ((hwpoison_filter(p) && TestClearPageHWPoison(p)) - || (p != head && TestSetPageHWPoison(head))) { + if (hwpoison_filter(p)) { + if (TestClearPageHWPoison(head)) num_poisoned_pages_dec(); - unlock_page(head); - return 0; - } + unlock_page(head); + return 0; } unlock_page(head); dissolve_free_huge_page(p);