diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-13 23:04:36 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-13 23:04:36 +0300 |
commit | d74b15dbbbd2741f3580d7c884cd285144ae0cab (patch) | |
tree | 55b3f50dd918aea51fe4b3df7f476afd73c1bcb0 /drivers/nvdimm/blk.c | |
parent | 298ce0fd50309a4805413f9572280606e4007cbe (diff) | |
parent | 6ec26b8b2d70b41d7c2affd8660d94ce78b3823c (diff) | |
download | linux-d74b15dbbbd2741f3580d7c884cd285144ae0cab.tar.xz |
Merge tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm updates from Dan Williams:
"Small collection of cleanups to rework usage of ->queuedata and the
GUID api"
* tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
nvdimm/pmem: stop using ->queuedata
nvdimm/btt: stop using ->queuedata
nvdimm/blk: stop using ->queuedata
libnvdimm: Replace guid_copy() with import_guid() where it makes sense
Diffstat (limited to 'drivers/nvdimm/blk.c')
-rw-r--r-- | drivers/nvdimm/blk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c index 036e23aef9b0..39030a324d7f 100644 --- a/drivers/nvdimm/blk.c +++ b/drivers/nvdimm/blk.c @@ -165,7 +165,7 @@ static int nsblk_do_bvec(struct nd_namespace_blk *nsblk, static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio) { struct bio_integrity_payload *bip; - struct nd_namespace_blk *nsblk; + struct nd_namespace_blk *nsblk = bio->bi_disk->private_data; struct bvec_iter iter; unsigned long start; struct bio_vec bvec; @@ -176,7 +176,6 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio) return BLK_QC_T_NONE; bip = bio_integrity(bio); - nsblk = q->queuedata; rw = bio_data_dir(bio); do_acct = blk_queue_io_stat(bio->bi_disk->queue); if (do_acct) @@ -260,7 +259,6 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk) blk_queue_max_hw_sectors(q, UINT_MAX); blk_queue_logical_block_size(q, nsblk_sector_size(nsblk)); blk_queue_flag_set(QUEUE_FLAG_NONROT, q); - q->queuedata = nsblk; disk = alloc_disk(0); if (!disk) @@ -270,6 +268,7 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk) disk->fops = &nd_blk_fops; disk->queue = q; disk->flags = GENHD_FL_EXT_DEVT; + disk->private_data = nsblk; nvdimm_namespace_disk_name(&nsblk->common, disk->disk_name); if (devm_add_action_or_reset(dev, nd_blk_release_disk, disk)) |