Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christoph Hellwig and committed by
Jens Axboe
833f84e2 c8178674

+1 -11
+1 -11
block/blk-core.c
··· 973 973 static noinline_for_stack bool 974 974 generic_make_request_checks(struct bio *bio) 975 975 { 976 - struct request_queue *q; 976 + struct request_queue *q = bio->bi_disk->queue; 977 977 int nr_sectors = bio_sectors(bio); 978 978 blk_status_t status = BLK_STS_IOERR; 979 - char b[BDEVNAME_SIZE]; 980 979 981 980 might_sleep(); 982 - 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 981 992 982 /* 993 983 * For a REQ_NOWAIT based request, return -EOPNOTSUPP