Re: [PATCH] blk-mq-sched: Fix blk_mq_sched_alloc_tags() error handling

From: Jens Axboe
Date: Tue Jul 27 2021 - 18:45:10 EST


On 7/27/21 3:32 AM, John Garry wrote:
> 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.

Applied, thanks.

--
Jens Axboe