nilfs2: Remove check for PageError
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 17 May 2022 22:12:25 +0000 (18:12 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 29 Jun 2022 12:51:07 +0000 (08:51 -0400)
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>
fs/nilfs2/dir.c

index f8f4c2f..decd647 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;
                }
        }