Message ID | 20220527155036.524743-10-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Begin removing PageError | expand |
On Fri, May 27, 2022 at 04:50:21PM +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/nilfs2/dir.c b/fs/nilfs2/dir.c index f8f4c2ff52f4..decd6471300b 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -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; } }
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)