btrfs: don't check PageError in btrfs_verify_page
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 06:04:53 +0000 (08:04 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:35 +0000 (13:59 +0200)
btrfs_verify_page is called from the readpage completion handler, which
is only used to read pages, or parts of pages that aren't uptodate yet.
The only case where PageError could be set on a page in btrfs is if we
had a previous writeback error, but in that case we won't called readpage
on it, as it has previously been marked uptodate.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index a943a66..178e823 100644 (file)
@@ -484,7 +484,7 @@ void extent_clear_unlock_delalloc(struct btrfs_inode *inode, u64 start, u64 end,
 static bool btrfs_verify_page(struct page *page, u64 start)
 {
        if (!fsverity_active(page->mapping->host) ||
-           PageError(page) || PageUptodate(page) ||
+           PageUptodate(page) ||
            start >= i_size_read(page->mapping->host))
                return true;
        return fsverity_verify_page(page);