]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nilfs2: Remove check for PageError
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 17 May 2022 22:12:25 +0000 (18:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jul 2024 07:08:14 +0000 (09:08 +0200)
[ Upstream commit 79ea65563ad8aaab309d61eeb4d5019dd6cf5fa0 ]

If read_mapping_page() encounters an error, it returns an errno, not a
page with PageError set, so this test is not needed.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Stable-dep-of: 7373a51e7998 ("nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nilfs2/dir.c

index eb7de9e2a384e04714dff8a425726dade5fe1601..24cfe9db66e024d251b67f2952c8681f05521521 100644 (file)
@@ -194,7 +194,7 @@ static struct page *nilfs_get_page(struct inode *dir, unsigned long n)
        if (!IS_ERR(page)) {
                kmap(page);
                if (unlikely(!PageChecked(page))) {
-                       if (PageError(page) || !nilfs_check_page(page))
+                       if (!nilfs_check_page(page))
                                goto fail;
                }
        }