Blob Blame History Raw
From 3794027d649675041b111018f59c6d8014421ba1 Mon Sep 17 00:00:00 2001
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Date: Tue, 25 May 2021 10:11:25 -0400
Subject: [PATCH] filemap: Remove PageHWPoison check from next_uptodate_page()

References: bnc#1190208 (MM functional and performance backports)
Patch-mainline: v5.17
Git-commit: 9144785b02765409f63b2fe16948bc746248cf1f

Pages are individually marked as suffering from hardware poisoning.
Checking that the head page is not hardware poisoned doesn't make
sense; we might be after a subpage.  We check each page individually
before we use it, so this was an optimisation gone wrong.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 mm/filemap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 6e07f3be9572..91eb57059f9a 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3232,8 +3232,6 @@ static struct page *next_uptodate_page(struct page *page,
 			goto skip;
 		if (!PageUptodate(page) || PageReadahead(page))
 			goto skip;
-		if (PageHWPoison(page))
-			goto skip;
 		if (!trylock_page(page))
 			goto skip;
 		if (page->mapping != mapping)