Message ID | 20210305015554.gEJGOznd-%akpm@linux-foundation.org |
---|---|
State | New |
Headers | show |
Series | +mm-hwpoison-do-not-lock-page-again-when-me_huge_page-successfully-recovers.patchadded to -mm tree | expand |
--- a/mm/memory-failure.c~mm-hwpoison-do-not-lock-page-again-when-me_huge_page-successfully-recovers +++ a/mm/memory-failure.c @@ -834,7 +834,6 @@ static int me_huge_page(struct page *p, page_ref_inc(p); res = MF_RECOVERED; } - lock_page(hpage); } return res; @@ -1290,7 +1289,8 @@ static int memory_failure_hugetlb(unsign res = identify_page_state(pfn, p, page_flags); out: - unlock_page(head); + if (PageLocked(head)) + unlock_page(head); return res; }