diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory-failure.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 2015c9a06cae..ac595e7a3a95 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -1691,16 +1691,16 @@ static int soft_offline_in_use_page(struct page *page, int flags) | |||
1691 | 1691 | ||
1692 | if (!PageHuge(page) && PageTransHuge(hpage)) { | 1692 | if (!PageHuge(page) && PageTransHuge(hpage)) { |
1693 | lock_page(hpage); | 1693 | lock_page(hpage); |
1694 | ret = split_huge_page(hpage); | 1694 | if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) { |
1695 | unlock_page(hpage); | 1695 | unlock_page(hpage); |
1696 | if (unlikely(ret || PageTransCompound(page) || | 1696 | if (!PageAnon(hpage)) |
1697 | !PageAnon(page))) { | 1697 | pr_info("soft offline: %#lx: non anonymous thp\n", page_to_pfn(page)); |
1698 | pr_info("soft offline: %#lx: failed to split THP\n", | 1698 | else |
1699 | page_to_pfn(page)); | 1699 | pr_info("soft offline: %#lx: thp split failed\n", page_to_pfn(page)); |
1700 | if (flags & MF_COUNT_INCREASED) | 1700 | put_hwpoison_page(hpage); |
1701 | put_hwpoison_page(hpage); | ||
1702 | return -EBUSY; | 1701 | return -EBUSY; |
1703 | } | 1702 | } |
1703 | unlock_page(hpage); | ||
1704 | get_hwpoison_page(page); | 1704 | get_hwpoison_page(page); |
1705 | put_hwpoison_page(hpage); | 1705 | put_hwpoison_page(hpage); |
1706 | } | 1706 | } |