reiserfs: 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 is dead code.

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

index bd073836e1414e2b667902c0ee83c108a0bcec25..4366413692836261925eb57edf0f47fd881f4a64 100644 (file)
@@ -440,16 +440,9 @@ static struct page *reiserfs_get_page(struct inode *dir, size_t n)
         */
        mapping_set_gfp_mask(mapping, GFP_NOFS);
        page = read_mapping_page(mapping, n >> PAGE_SHIFT, NULL);
-       if (!IS_ERR(page)) {
+       if (!IS_ERR(page))
                kmap(page);
-               if (PageError(page))
-                       goto fail;
-       }
        return page;
-
-fail:
-       reiserfs_put_page(page);
-       return ERR_PTR(-EIO);
 }
 
 static inline __u32 xattr_hash(const char *msg, int len)