diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0a1ec5cd3b8f823d12f714de06c5160b48f259b9..4e33c3fded5ca9484c4c74bc052e57bea9b2ad1c 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8647,8 +8647,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode, * callbacks - they require an allocated dip and a clone of dio_bio. */ if (bio && dip) { - bio->bi_error = -EIO; - bio_endio(bio); + bio_io_error(bio); /* * The end io callbacks free our dip, do the final put on bio * and all the cleanup and final put for dio_bio (through