Skip to content

Commit 833f84e

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove the NULL queue check in generic_make_request_checks
All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent c817867 commit 833f84e

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

‎block/blk-core.c‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -973,22 +973,12 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
973973
static noinline_for_stack bool
974974
generic_make_request_checks(struct bio *bio)
975975
{
976-
struct request_queue *q;
976+
struct request_queue *q = bio->bi_disk->queue;
977977
int nr_sectors = bio_sectors(bio);
978978
blk_status_t status = BLK_STS_IOERR;
979-
char b[BDEVNAME_SIZE];
980979

981980
might_sleep();
982981

983-
q = bio->bi_disk->queue;
984-
if (unlikely(!q)) {
985-
printk(KERN_ERR
986-
"generic_make_request: Trying to access "
987-
"nonexistent block-device %s (%Lu)\n",
988-
bio_devname(bio, b), (long long)bio->bi_iter.bi_sector);
989-
goto end_io;
990-
}
991-
992982
/*
993983
* For a REQ_NOWAIT based request, return -EOPNOTSUPP
994984
* if queue is not a request based queue.

0 commit comments

Comments
 (0)