Skip to content

Commit

Permalink
block: convert leftovers to bdev_get_queue
Browse files Browse the repository at this point in the history
Convert bdev->bd_disk->queue to bdev_get_queue(), which is faster.
Apparently, there are a few such spots in block that got lost during
rebases.

Reviewed-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Pavel Begunkov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Oct 20, 2021
1 parent cf6d623 commit 859897c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ EXPORT_SYMBOL(submit_bio);
*/
int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags)
{
struct request_queue *q = bio->bi_bdev->bd_disk->queue;
struct request_queue *q = bdev_get_queue(bio->bi_bdev);
blk_qc_t cookie = READ_ONCE(bio->bi_cookie);
int ret;

Expand Down
2 changes: 1 addition & 1 deletion block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ void __blk_queue_split(struct request_queue *q, struct bio **bio,
*/
void blk_queue_split(struct bio **bio)
{
struct request_queue *q = (*bio)->bi_bdev->bd_disk->queue;
struct request_queue *q = bdev_get_queue((*bio)->bi_bdev);
unsigned int nr_segs;

if (blk_may_split(q, *bio))
Expand Down

0 comments on commit 859897c

Please sign in to comment.