]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ntfs3: 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/ntfs3/ntfs_fs.h

index 8de129a6419b5b338d69d2a2aa7d80d1f216a8ca..f28726c4e845ba5c7566e19800452a669cd434d3 100644 (file)
@@ -896,13 +896,8 @@ static inline struct page *ntfs_map_page(struct address_space *mapping,
 {
        struct page *page = read_mapping_page(mapping, index, NULL);
 
-       if (!IS_ERR(page)) {
+       if (!IS_ERR(page))
                kmap(page);
-               if (!PageError(page))
-                       return page;
-               ntfs_unmap_page(page);
-               return ERR_PTR(-EIO);
-       }
        return page;
 }