Skip to content

Commit

Permalink
btrfs: open code btrfs_bio_end_io in btrfs_dio_submit_io
Browse files Browse the repository at this point in the history
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 <johannes.thumshirn@wdc.com>
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>
  • Loading branch information
Christoph Hellwig authored and David Sterba committed Jun 19, 2023
1 parent fbe9608 commit 112397a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 112397a

Please sign in to comment.