mirror of https://github.com/OpenIPC/firmware.git
30 lines
976 B
Diff
30 lines
976 B
Diff
diff -drupN a/mm/memory-failure.c b/mm/memory-failure.c
|
|
--- a/mm/memory-failure.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/mm/memory-failure.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -1704,19 +1704,17 @@ static int soft_offline_in_use_page(stru
|
|
struct page *hpage = compound_head(page);
|
|
|
|
if (!PageHuge(page) && PageTransHuge(hpage)) {
|
|
- lock_page(hpage);
|
|
- if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
|
|
- unlock_page(hpage);
|
|
- if (!PageAnon(hpage))
|
|
+ lock_page(page);
|
|
+ if (!PageAnon(page) || unlikely(split_huge_page(page))) {
|
|
+ unlock_page(page);
|
|
+ if (!PageAnon(page))
|
|
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);
|
|
+ put_hwpoison_page(page);
|
|
return -EBUSY;
|
|
}
|
|
- unlock_page(hpage);
|
|
- get_hwpoison_page(page);
|
|
- put_hwpoison_page(hpage);
|
|
+ unlock_page(page);
|
|
}
|
|
|
|
if (PageHuge(page))
|