VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Yang Shi <shy828301@gmail.com> 2021-10-28 14:36:07 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-10-28 17:18:55 -0700 commit: c7cb42e94473aafe553c0f2a3d8ca904599399ed parent: 8dcb3060d81dbfa8d954a2ec64ef7ca330f5bb4d
Commit Summary:
mm: hwpoison: remove the unnecessary THP check
Diffstat:
1 file changed, 0 insertions, 14 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 3e6449f2102a..73f68699e7ab 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1147,20 +1147,6 @@ static int __get_hwpoison_page(struct page *page)
 	if (!HWPoisonHandlable(head))
 		return -EBUSY;
 
-	if (PageTransHuge(head)) {
-		/*
-		 * Non anonymous thp exists only in allocation/free time. We
-		 * can't handle such a case correctly, so let's give it up.
-		 * This should be better than triggering BUG_ON when kernel
-		 * tries to touch the "partially handled" page.
-		 */
-		if (!PageAnon(head)) {
-			pr_err("Memory failure: %#lx: non anonymous thp\n",
-				page_to_pfn(page));
-			return 0;
-		}
-	}
-
 	if (get_page_unless_zero(head)) {
 		if (head == compound_head(page))
 			return 1;