Skip to content

Commit daa2897

Browse files
Christoph Hellwigdjbw
authored andcommitted
nvdimm/blk: stop using ->queuedata
In preparation for removing queuedata as an argument to make_request_fn() drop the dependency ->queuedata. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent f37b451 commit daa2897

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/nvdimm/blk.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static int nsblk_do_bvec(struct nd_namespace_blk *nsblk,
165165
static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio)
166166
{
167167
struct bio_integrity_payload *bip;
168-
struct nd_namespace_blk *nsblk;
168+
struct nd_namespace_blk *nsblk = bio->bi_disk->private_data;
169169
struct bvec_iter iter;
170170
unsigned long start;
171171
struct bio_vec bvec;
@@ -176,7 +176,6 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio)
176176
return BLK_QC_T_NONE;
177177

178178
bip = bio_integrity(bio);
179-
nsblk = q->queuedata;
180179
rw = bio_data_dir(bio);
181180
do_acct = nd_iostat_start(bio, &start);
182181
bio_for_each_segment(bvec, bio, iter) {
@@ -258,7 +257,6 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk)
258257
blk_queue_max_hw_sectors(q, UINT_MAX);
259258
blk_queue_logical_block_size(q, nsblk_sector_size(nsblk));
260259
blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
261-
q->queuedata = nsblk;
262260

263261
disk = alloc_disk(0);
264262
if (!disk)
@@ -268,6 +266,7 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk)
268266
disk->fops = &nd_blk_fops;
269267
disk->queue = q;
270268
disk->flags = GENHD_FL_EXT_DEVT;
269+
disk->private_data = nsblk;
271270
nvdimm_namespace_disk_name(&nsblk->common, disk->disk_name);
272271

273272
if (devm_add_action_or_reset(dev, nd_blk_release_disk, disk))

0 commit comments

Comments
 (0)