summaryrefslogtreecommitdiff
path: root/block/blk-zoned.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <kch@nvidia.com>2022-01-24 12:11:02 +0300
committerJens Axboe <axboe@kernel.dk>2022-02-02 17:49:59 +0300
commit0a3140ea0fae377c9eaa031b7db1670ae422ed47 (patch)
treebddc6fc46c05cede8a67a56092f56affcb05b55d /block/blk-zoned.c
parent3b005bf6acf009abd700e2c652c86e5c209cf63d (diff)
downloadlinux-0a3140ea0fae377c9eaa031b7db1670ae422ed47.tar.xz
block: pass a block_device and opf to blk_next_bio
All callers need to set the block_device and operation, so lift that into the common code. Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220124091107.642561-15-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-zoned.c')
-rw-r--r--block/blk-zoned.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 774ecc598bee..5ab755d792c8 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -215,9 +215,8 @@ static int blkdev_zone_reset_all_emulated(struct block_device *bdev,
continue;
}
- bio = blk_next_bio(bio, 0, gfp_mask);
- bio_set_dev(bio, bdev);
- bio->bi_opf = REQ_OP_ZONE_RESET | REQ_SYNC;
+ bio = blk_next_bio(bio, bdev, 0, REQ_OP_ZONE_RESET | REQ_SYNC,
+ gfp_mask);
bio->bi_iter.bi_sector = sector;
sector += zone_sectors;
@@ -306,9 +305,7 @@ int blkdev_zone_mgmt(struct block_device *bdev, enum req_opf op,
}
while (sector < end_sector) {
- bio = blk_next_bio(bio, 0, gfp_mask);
- bio_set_dev(bio, bdev);
- bio->bi_opf = op | REQ_SYNC;
+ bio = blk_next_bio(bio, bdev, 0, op | REQ_SYNC, gfp_mask);
bio->bi_iter.bi_sector = sector;
sector += zone_sectors;