null_blk: stop using ->queuedata for bio mode
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Jul 2020 08:59:31 +0000 (10:59 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Jul 2020 13:27:23 +0000 (07:27 -0600)
Instead of setting up the queuedata as well just use one private data
field.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk_main.c

index 8225924..93ce0a0 100644 (file)
@@ -1392,7 +1392,7 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio)
 {
        sector_t sector = bio->bi_iter.bi_sector;
        sector_t nr_sectors = bio_sectors(bio);
-       struct nullb *nullb = q->queuedata;
+       struct nullb *nullb = bio->bi_disk->private_data;
        struct nullb_queue *nq = nullb_to_queue(nullb);
        struct nullb_cmd *cmd;