Skip to content
Commit b855b04a authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

block: blk-throttle should be drained regardless of q->elevator



Currently, blk_cleanup_queue() doesn't call elv_drain_elevator() if
q->elevator doesn't exist; however, bio based drivers don't have
elevator initialized but can still use blk-throttle.  This patch moves
q->elevator test inside blk_drain_queue() such that only
elv_drain_elevator() is skipped if !q->elevator.

-v2: loop can have registered queue which has NULL request_fn.  Make
     sure we don't call into __blk_run_queue() in such cases.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarVivek Goyal <vgoyal@redhat.com>

Fold in bug fix from Vivek.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ea5f4db8
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