Skip to content

Commit

Permalink
blk-mq: handle NULL req return from blk_map_request in single queue mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
axboe committed Jun 4, 2014
1 parent e6cdb09 commit ff87bce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff87bce

Please sign in to comment.