diff options
author | Jens Axboe <axboe@fb.com> | 2014-06-03 13:59:49 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-06-03 23:04:39 -0400 |
commit | ff87bcec197774f938fbd1fe996068005f3dfb3c (patch) | |
tree | 700871e846f19f24a2d16b61e62d0ce01a706eb8 | |
parent | e6cdb0929fe6726ba5203fc5529b74564d98a9e9 (diff) |
blk-mq: handle NULL req return from blk_map_request in single queue mode
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>
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 3bb4cfec276b..96e6eb638f00 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -1276,6 +1276,8 @@ static void blk_sq_make_request(struct request_queue *q, struct bio *bio) | |||
1276 | return; | 1276 | return; |
1277 | 1277 | ||
1278 | rq = blk_mq_map_request(q, bio, &data); | 1278 | rq = blk_mq_map_request(q, bio, &data); |
1279 | if (unlikely(!rq)) | ||
1280 | return; | ||
1279 | 1281 | ||
1280 | if (unlikely(is_flush_fua)) { | 1282 | if (unlikely(is_flush_fua)) { |
1281 | blk_mq_bio_to_request(rq, bio); | 1283 | blk_mq_bio_to_request(rq, bio); |