diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-10-14 15:03:30 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 06:17:37 -0600 |
commit | ed6cddefdfd361af23a25bdeaaa5e345ac714c38 (patch) | |
tree | 7a107fdde815b75b1d6159e2f534ac7cdfe4d236 /block/genhd.c | |
parent | eab4e02733699cdf76fbe5e542d248c28454b3af (diff) | |
download | lwn-ed6cddefdfd361af23a25bdeaaa5e345ac714c38.tar.gz lwn-ed6cddefdfd361af23a25bdeaaa5e345ac714c38.zip |
block: convert the rest of block to bdev_get_queue
Convert bdev->bd_disk->queue to bdev_get_queue(), it's uses a cached
queue pointer and so is faster.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/addf6ea988c04213697ba3684c853e4ed7642a39.1634219547.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c index d148c38450d7..759bc06810f8 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -883,7 +883,7 @@ ssize_t part_stat_show(struct device *dev, struct device_attribute *attr, char *buf) { struct block_device *bdev = dev_to_bdev(dev); - struct request_queue *q = bdev->bd_disk->queue; + struct request_queue *q = bdev_get_queue(bdev); struct disk_stats stat; unsigned int inflight; @@ -927,7 +927,7 @@ ssize_t part_inflight_show(struct device *dev, struct device_attribute *attr, char *buf) { struct block_device *bdev = dev_to_bdev(dev); - struct request_queue *q = bdev->bd_disk->queue; + struct request_queue *q = bdev_get_queue(bdev); unsigned int inflight[2]; if (queue_is_mq(q)) |