if (ret)
goto out;
bio = req->bio;
- bio->bi_bdev = bdev;
+ bio_set_dev(bio, bdev);
if (bdev && meta_buffer && meta_len) {
meta = nvme_add_user_metadata(bio, meta_buffer, meta_len,
meta_seed, write);
vcmd->ph_rw.metadata = cpu_to_le64(metadata_dma);
}
- bio->bi_bdev = ns->disk->part0;
+ bio_set_dev(bio, ns->disk->part0);
}
blk_execute_rq(NULL, rq, 0);
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);
* 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);
}
}