mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
blk-mq-sched: check for successful allocation before assigning tag
We don't trigger this from the normal IO path, since we always use blocking allocations from there. But Bart saw it testing multipath dm, since that is a heavy user of atomic request allocations in the map and clone path. Reported-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
5a797e00dc
commit
b48fda0976
1 changed files with 2 additions and 1 deletions
|
@ -134,7 +134,8 @@ struct request *blk_mq_sched_get_request(struct request_queue *q,
|
|||
rq = __blk_mq_alloc_request(data, op);
|
||||
} else {
|
||||
rq = __blk_mq_alloc_request(data, op);
|
||||
data->hctx->tags->rqs[rq->tag] = rq;
|
||||
if (rq)
|
||||
data->hctx->tags->rqs[rq->tag] = rq;
|
||||
}
|
||||
|
||||
if (rq) {
|
||||
|
|
Loading…
Reference in a new issue