diff options
author | Christoph Hellwig <hch@lst.de> | 2022-01-24 12:11:06 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-02-02 17:49:59 +0300 |
commit | 49add4966d79244013fce35f95c6833fae82b8b1 (patch) | |
tree | 915dec99a236142c08e4b0ac94346f178d467987 /drivers/nvme/target/zns.c | |
parent | 07888c665b405b1cd3577ddebfeb74f4717a84c4 (diff) | |
download | linux-49add4966d79244013fce35f95c6833fae82b8b1.tar.xz |
block: pass a block_device and opf to bio_init
Pass the block_device that we plan to use this bio for and the
operation to bio_init to optimize the assignment. A NULL block_device
can be passed, both for the passthrough case on a raw request_queue and
to temporarily avoid refactoring some nasty code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220124091107.642561-19-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/zns.c')
-rw-r--r-- | drivers/nvme/target/zns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c index 62c53e8f26d3..3e421217a7ad 100644 --- a/drivers/nvme/target/zns.c +++ b/drivers/nvme/target/zns.c @@ -552,8 +552,8 @@ void nvmet_bdev_execute_zone_append(struct nvmet_req *req) if (nvmet_use_inline_bvec(req)) { bio = &req->z.inline_bio; - bio_init(bio, req->inline_bvec, ARRAY_SIZE(req->inline_bvec)); - bio->bi_opf = op; + bio_init(bio, req->ns->bdev, req->inline_bvec, + ARRAY_SIZE(req->inline_bvec), op); } else { bio = bio_alloc(req->ns->bdev, req->sg_cnt, op, GFP_KERNEL); } |