Skip to content
Commit b93af305 authored by John Garry's avatar John Garry Committed by Jens Axboe
Browse files

blk-mq-sched: Fix blk_mq_sched_alloc_tags() error handling

If the blk_mq_sched_alloc_tags() -> blk_mq_alloc_rqs() call fails, then we
call blk_mq_sched_free_tags() -> blk_mq_free_rqs().

It is incorrect to do so, as any rqs would have already been freed in the
blk_mq_alloc_rqs() call.

Fix by calling blk_mq_free_rq_map() only directly.

Fixes: 6917ff0b

 ("blk-mq-sched: refactor scheduler initialization")
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/1627378373-148090-1-git-send-email-john.garry@huawei.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3ce6e1f6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment