]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
blk-mq: handle NULL req return from blk_map_request in single queue mode
authorJens Axboe <axboe@fb.com>
Tue, 3 Jun 2014 17:59:49 +0000 (11:59 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 4 Jun 2014 03:04:39 +0000 (21:04 -0600)
blk_mq_map_request() can return NULL if we fail entering the queue
(dying, or removed), in which case it has already ended IO on the
bio. So nothing more to do, except just return.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index 3bb4cfec276b028962aff1312240659034f2d905..96e6eb638f00153d12f67434bc4c3d839ecff5d5 100644 (file)
@@ -1276,6 +1276,8 @@ static void blk_sq_make_request(struct request_queue *q, struct bio *bio)
                return;
 
        rq = blk_mq_map_request(q, bio, &data);
+       if (unlikely(!rq))
+               return;
 
        if (unlikely(is_flush_fua)) {
                blk_mq_bio_to_request(rq, bio);