null_blk: oops when initializing without lightnvm
[deliverable/linux.git] / mm / memory-failure.c
index 2015c9a06cae4df918c3f52c63385ce5bdeb7ac4..ac595e7a3a955d457e8ff3b6934e8728e8db6d5d 100644 (file)
@@ -1691,16 +1691,16 @@ static int soft_offline_in_use_page(struct page *page, int flags)
 
        if (!PageHuge(page) && PageTransHuge(hpage)) {
                lock_page(hpage);
-               ret = split_huge_page(hpage);
-               unlock_page(hpage);
-               if (unlikely(ret || PageTransCompound(page) ||
-                            !PageAnon(page))) {
-                       pr_info("soft offline: %#lx: failed to split THP\n",
-                               page_to_pfn(page));
-                       if (flags & MF_COUNT_INCREASED)
-                               put_hwpoison_page(hpage);
+               if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
+                       unlock_page(hpage);
+                       if (!PageAnon(hpage))
+                               pr_info("soft offline: %#lx: non anonymous thp\n", page_to_pfn(page));
+                       else
+                               pr_info("soft offline: %#lx: thp split failed\n", page_to_pfn(page));
+                       put_hwpoison_page(hpage);
                        return -EBUSY;
                }
+               unlock_page(hpage);
                get_hwpoison_page(page);
                put_hwpoison_page(hpage);
        }
This page took 0.030064 seconds and 5 git commands to generate.