From: Christoph Hellwig Date: Wed, 31 May 2023 07:54:01 +0000 (+0200) Subject: btrfs: open code btrfs_bio_end_io in btrfs_dio_submit_io X-Git-Tag: v6.6.7~2168^2~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=112397acc358883a90bb32b9597724dfbc3ccb41;p=platform%2Fkernel%2Flinux-starfive.git btrfs: open code btrfs_bio_end_io in btrfs_dio_submit_io btrfs_dio_submit_io is the only place that uses btrfs_bio_end_io to end a bio that hasn't been submitted using btrfs_submit_bio yet, and this invariant will become a problem with upcoming changes to the btrfs bio layer. Just open code the assignment of bi_status and the call to btrfs_dio_end_io. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8ae448a..020d871b 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7845,7 +7845,8 @@ static void btrfs_dio_submit_io(const struct iomap_iter *iter, struct bio *bio, ret = btrfs_extract_ordered_extent(bbio, dio_data->ordered); if (ret) { - btrfs_bio_end_io(bbio, errno_to_blk_status(ret)); + bbio->bio.bi_status = errno_to_blk_status(ret); + btrfs_dio_end_io(bbio); return; } }