]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ufs: Remove checks 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, or a page that is not Uptodate, so this is
dead code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/ufs/dir.c
fs/ufs/util.c

index b721d0bda5e5d18f6d189c9ee035f9fdd28990ed..391efaf1d528975256d9ac4cd3230daaaebb4702 100644 (file)
@@ -193,7 +193,7 @@ static struct page *ufs_get_page(struct inode *dir, unsigned long n)
        if (!IS_ERR(page)) {
                kmap(page);
                if (unlikely(!PageChecked(page))) {
-                       if (PageError(page) || !ufs_check_page(page))
+                       if (!ufs_check_page(page))
                                goto fail;
                }
        }
index 4fa633f842749d533b098420eb5dd9b6ba66e77c..08ddf41eaaadc75335fc2b9ee4a58240183e8f80 100644 (file)
@@ -264,17 +264,6 @@ struct page *ufs_get_locked_page(struct address_space *mapping,
                        put_page(page);
                        return NULL;
                }
-
-               if (!PageUptodate(page) || PageError(page)) {
-                       unlock_page(page);
-                       put_page(page);
-
-                       printk(KERN_ERR "ufs_change_blocknr: "
-                              "can not read page: ino %lu, index: %lu\n",
-                              inode->i_ino, index);
-
-                       return ERR_PTR(-EIO);
-               }
        }
        if (!page_has_buffers(page))
                create_empty_buffers(page, 1 << inode->i_blkbits, 0);