summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-01 10:59:41 +0200
committerJens Axboe <axboe@kernel.dk>2020-07-01 07:27:24 -0600
commit833f84e2b9b512c02a8d751e63e2b7de4ea2aa82 (patch)
tree0ced588f9f8d73d4ffc38e8af7a60838f6c88df2 /block/blk-core.c
parentc8178674608679c8146235abb0be4e2c3a86f409 (diff)
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>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 95dca74534ff..37435d0d4335 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -973,22 +973,12 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
static noinline_for_stack bool
generic_make_request_checks(struct bio *bio)
{
- struct request_queue *q;
+ struct request_queue *q = bio->bi_disk->queue;
int nr_sectors = bio_sectors(bio);
blk_status_t status = BLK_STS_IOERR;
- char b[BDEVNAME_SIZE];
might_sleep();
- q = bio->bi_disk->queue;
- if (unlikely(!q)) {
- printk(KERN_ERR
- "generic_make_request: Trying to access "
- "nonexistent block-device %s (%Lu)\n",
- bio_devname(bio, b), (long long)bio->bi_iter.bi_sector);
- goto end_io;
- }
-
/*
* For a REQ_NOWAIT based request, return -EOPNOTSUPP
* if queue is not a request based queue.