aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/nvme/target
diff options
context:
space:
mode:
authorChaitanya Kulkarni <kch@nvidia.com>2022-01-24 10:11:02 +0100
committerJens Axboe <axboe@kernel.dk>2022-02-02 07:49:59 -0700
commit0a3140ea0fae377c9eaa031b7db1670ae422ed47 (patch)
treebddc6fc46c05cede8a67a56092f56affcb05b55d /drivers/nvme/target
parentblock: move blk_next_bio to bio.c (diff)
downloadwireguard-linux-0a3140ea0fae377c9eaa031b7db1670ae422ed47.tar.xz
wireguard-linux-0a3140ea0fae377c9eaa031b7db1670ae422ed47.zip
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 'drivers/nvme/target')
-rw-r--r--drivers/nvme/target/zns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c
index 46bc30fe85d2..247de74247fa 100644
--- a/drivers/nvme/target/zns.c
+++ b/drivers/nvme/target/zns.c
@@ -412,10 +412,10 @@ static u16 nvmet_bdev_zone_mgmt_emulate_all(struct nvmet_req *req)
while (sector < get_capacity(bdev->bd_disk)) {
if (test_bit(blk_queue_zone_no(q, sector), d.zbitmap)) {
- bio = blk_next_bio(bio, 0, GFP_KERNEL);
- bio->bi_opf = zsa_req_op(req->cmd->zms.zsa) | REQ_SYNC;
+ bio = blk_next_bio(bio, bdev, 0,
+ zsa_req_op(req->cmd->zms.zsa) | REQ_SYNC,
+ GFP_KERNEL);
bio->bi_iter.bi_sector = sector;
- bio_set_dev(bio, bdev);
/* This may take a while, so be nice to others */
cond_resched();
}