From: Matthew Wilcox (Oracle) Date: Tue, 25 May 2021 14:11:25 +0000 (-0400) Subject: filemap: Remove PageHWPoison check from next_uptodate_page() X-Git-Tag: v5.17-rc1~107^2~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9144785b02765409f63b2fe16948bc746248cf1f;p=thirdparty%2Fkernel%2Flinux.git filemap: Remove PageHWPoison check from next_uptodate_page() 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) Reviewed-by: Christoph Hellwig Reviewed-by: William Kucharski --- diff --git a/mm/filemap.c b/mm/filemap.c index daa0e23a6ee66..39c4c46c61337 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -3253,8 +3253,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)