Skip to content
Commit 1ad43c00 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed



When blk_mq_get_request() failed, preempt counter isn't
released, and blk_mq_make_request() doesn't release the counter
too.

This patch fixes the issue, and makes sure that preempt counter
is only held if rq is allocated successfully. The same policy is
applied on .q_usage_counter too.

Signed-off-by: default avatarMing Lei <minlei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 46d556e6
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