static blk_status_t btrfs_bio_csum(struct btrfs_bio *bbio)
 {
        if (bbio->bio.bi_opf & REQ_META)
-               return btree_csum_one_bio(bbio);
+               return errno_to_blk_status(btree_csum_one_bio(bbio));
        return errno_to_blk_status(btrfs_csum_one_bio(bbio));
 }
 
 
 /*
  * Checksum a dirty tree block before IO.
  */
-blk_status_t btree_csum_one_bio(struct btrfs_bio *bbio)
+int btree_csum_one_bio(struct btrfs_bio *bbio)
 {
        struct extent_buffer *eb = bbio->private;
        struct btrfs_fs_info *fs_info = eb->fs_info;
 
        /* Btree blocks are always contiguous on disk. */
        if (WARN_ON_ONCE(bbio->file_offset != eb->start))
-               return BLK_STS_IOERR;
+               return -EIO;
        if (WARN_ON_ONCE(bbio->bio.bi_iter.bi_size != eb->len))
-               return BLK_STS_IOERR;
+               return -EIO;
 
        /*
         * If an extent_buffer is marked as EXTENT_BUFFER_ZONED_ZEROOUT, don't
         */
        if (test_bit(EXTENT_BUFFER_ZONED_ZEROOUT, &eb->bflags)) {
                memzero_extent_buffer(eb, 0, eb->len);
-               return BLK_STS_OK;
+               return 0;
        }
 
        if (WARN_ON_ONCE(found_start != eb->start))
-               return BLK_STS_IOERR;
+               return -EIO;
        if (WARN_ON(!btrfs_meta_folio_test_uptodate(eb->folios[0], eb)))
-               return BLK_STS_IOERR;
+               return -EIO;
 
        ASSERT(memcmp_extent_buffer(eb, fs_info->fs_devices->metadata_uuid,
                                    offsetof(struct btrfs_header, fsid),
                goto error;
        }
        write_extent_buffer(eb, result, 0, fs_info->csum_size);
-       return BLK_STS_OK;
+       return 0;
 
 error:
        btrfs_print_tree(eb, 0);
         */
        WARN_ON(IS_ENABLED(CONFIG_BTRFS_DEBUG) ||
                btrfs_header_owner(eb) == BTRFS_TREE_LOG_OBJECTID);
-       return errno_to_blk_status(ret);
+       return ret;
 }
 
 static bool check_tree_block_fsid(struct extent_buffer *eb)
 
 int btrfs_read_extent_buffer(struct extent_buffer *buf,
                             const struct btrfs_tree_parent_check *check);
 
-blk_status_t btree_csum_one_bio(struct btrfs_bio *bbio);
+int btree_csum_one_bio(struct btrfs_bio *bbio);
 int btrfs_alloc_log_tree_node(struct btrfs_trans_handle *trans,
                              struct btrfs_root *root);
 int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,