]> www.infradead.org Git - users/hch/block.git/commitdiff
block: remove a pointless ->queue dereference in __submit_bio_noacct submit_bio-cleanup
authorChristoph Hellwig <hch@lst.de>
Wed, 30 Mar 2022 08:44:24 +0000 (10:44 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 31 Mar 2022 12:05:48 +0000 (14:05 +0200)
There is a 1:1 relation between gendisk and request_queues once the
gendisk is allocated, so there is no need to go out and check the
queue pointer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-core.c

index 455186f782aa189e712ab15b8bb1c5cb9f777340..bfc5e423b13c6ed76f5a6be9d12ef6362a28647f 100644 (file)
@@ -698,7 +698,7 @@ static void __submit_bio_noacct(struct bio *bio)
        current->bio_list = bio_list_on_stack;
 
        do {
-               struct request_queue *q = bdev_get_queue(bio->bi_bdev);
+               struct gendisk *disk = bio->bi_bdev->bd_disk;
                struct bio_list lower, same;
 
                /*
@@ -716,7 +716,7 @@ static void __submit_bio_noacct(struct bio *bio)
                bio_list_init(&lower);
                bio_list_init(&same);
                while ((bio = bio_list_pop(&bio_list_on_stack[0])) != NULL)
-                       if (q == bdev_get_queue(bio->bi_bdev))
+                       if (bio->bi_bdev->bd_disk == disk)
                                bio_list_add(&same, bio);
                        else
                                bio_list_add(&lower, bio);