Message ID | 20220527155036.524743-9-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Begin removing PageError | expand |
On Fri, May 27, 2022 at 04:50:20PM +0100, Matthew Wilcox (Oracle) wrote: > If read_mapping_page() encounters an error, it returns an errno, not a > page with PageError set, so this test is not needed. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 2c2f179b6977..3410e4132405 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -204,8 +204,7 @@ static struct page * ext2_get_page(struct inode *dir, unsigned long n, if (!IS_ERR(page)) { *page_addr = kmap_local_page(page); if (unlikely(!PageChecked(page))) { - if (PageError(page) || !ext2_check_page(page, quiet, - *page_addr)) + if (!ext2_check_page(page, quiet, *page_addr)) goto fail; } }
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/ext2/dir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)