diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-26 15:33:06 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-26 08:50:01 -0700 |
commit | a7c7f7b2b641bef52212fbe8be4a66ede043d3c7 (patch) | |
tree | f9dd55409eb9d21b268198ef4d7fe1a39ae8960d /drivers/nvme/host/multipath.c | |
parent | a5bf0a92e1b8282c93018383b2526ca59602dd08 (diff) | |
download | lwn-a7c7f7b2b641bef52212fbe8be4a66ede043d3c7.tar.gz lwn-a7c7f7b2b641bef52212fbe8be4a66ede043d3c7.zip |
nvme: use bio_set_dev to assign ->bi_bdev
Always use the bio_set_dev helper to assign ->bi_bdev to make sure
other state related to the device is uptodate.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/multipath.c')
-rw-r--r-- | drivers/nvme/host/multipath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index a6d44e7a775f..65bd6efa5e1c 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -312,7 +312,7 @@ blk_qc_t nvme_ns_head_submit_bio(struct bio *bio) srcu_idx = srcu_read_lock(&head->srcu); ns = nvme_find_path(head); if (likely(ns)) { - bio->bi_bdev = ns->disk->part0; + bio_set_dev(bio, ns->disk->part0); bio->bi_opf |= REQ_NVME_MPATH; trace_block_bio_remap(bio, disk_devt(ns->head->disk), bio->bi_iter.bi_sector); @@ -352,7 +352,7 @@ static void nvme_requeue_work(struct work_struct *work) * Reset disk to the mpath node and resubmit to select a new * path. */ - bio->bi_bdev = head->disk->part0; + bio_set_dev(bio, head->disk->part0); submit_bio_noacct(bio); } } |