mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
btrfs: pass a btrfs_bio to btrfs_submit_bio
btrfs_submit_bio expects the bio passed to it to be embedded into a btrfs_bio structure. Pass the btrfs_bio directly to increase type safety and make the code self-documenting. Reviewed-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
7edb9a3e72
commit
ae42a154ca
@@ -7761,7 +7761,7 @@ static void btrfs_dio_submit_io(const struct iomap_iter *iter, struct bio *bio,
|
||||
dip->bytes = bio->bi_iter.bi_size;
|
||||
|
||||
dio_data->submitted += bio->bi_iter.bi_size;
|
||||
btrfs_submit_bio(bio, 0);
|
||||
btrfs_submit_bio(bbio, 0);
|
||||
}
|
||||
|
||||
static const struct iomap_ops btrfs_dio_iomap_ops = {
|
||||
@@ -9941,7 +9941,7 @@ int btrfs_encoded_read_regular_fill_pages(struct btrfs_inode *inode,
|
||||
|
||||
if (bio_add_page(bio, pages[i], bytes, 0) < bytes) {
|
||||
atomic_inc(&priv.pending);
|
||||
btrfs_submit_bio(bio, 0);
|
||||
btrfs_submit_bio(btrfs_bio(bio), 0);
|
||||
|
||||
bio = btrfs_bio_alloc(BIO_MAX_VECS, REQ_OP_READ, inode,
|
||||
btrfs_encoded_read_endio, &priv);
|
||||
@@ -9955,7 +9955,7 @@ int btrfs_encoded_read_regular_fill_pages(struct btrfs_inode *inode,
|
||||
} while (disk_io_size);
|
||||
|
||||
atomic_inc(&priv.pending);
|
||||
btrfs_submit_bio(bio, 0);
|
||||
btrfs_submit_bio(btrfs_bio(bio), 0);
|
||||
|
||||
if (atomic_dec_return(&priv.pending))
|
||||
io_wait_event(priv.wait, !atomic_read(&priv.pending));
|
||||
|
||||
Reference in New Issue
Block a user