Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pktcdvd: stop setting q->queuedata

The two users can get the private data from the gendisk with one less
pointer dereference, and we can drop the useless q parameter from
pkt_make_request_write.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240222073647.3776769-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
6f420d6a a3911966

+4 -5
+4 -5
drivers/block/pktcdvd.c
··· 2338 2338 pkt_queue_bio(pd, cloned_bio); 2339 2339 } 2340 2340 2341 - static void pkt_make_request_write(struct request_queue *q, struct bio *bio) 2341 + static void pkt_make_request_write(struct bio *bio) 2342 2342 { 2343 - struct pktcdvd_device *pd = q->queuedata; 2343 + struct pktcdvd_device *pd = bio->bi_bdev->bd_disk->private_data; 2344 2344 sector_t zone; 2345 2345 struct packet_data *pkt; 2346 2346 int was_empty, blocked_bio; ··· 2432 2432 2433 2433 static void pkt_submit_bio(struct bio *bio) 2434 2434 { 2435 - struct pktcdvd_device *pd = bio->bi_bdev->bd_disk->queue->queuedata; 2435 + struct pktcdvd_device *pd = bio->bi_bdev->bd_disk->private_data; 2436 2436 struct device *ddev = disk_to_dev(pd->disk); 2437 2437 struct bio *split; 2438 2438 ··· 2476 2476 split = bio; 2477 2477 } 2478 2478 2479 - pkt_make_request_write(bio->bi_bdev->bd_disk->queue, split); 2479 + pkt_make_request_write(split); 2480 2480 } while (split != bio); 2481 2481 2482 2482 return; ··· 2490 2490 2491 2491 blk_queue_logical_block_size(q, CD_FRAMESIZE); 2492 2492 blk_queue_max_hw_sectors(q, PACKET_MAX_SECTORS); 2493 - q->queuedata = pd; 2494 2493 } 2495 2494 2496 2495 static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev)