While converting to percpu_ref for freezing, add703fda981 ("blk-mq:
use percpu_ref for mq usage count") incorrectly made
blk_mq_freeze_queue() misbehave when freezing is nested due to
percpu_ref_kill() being invoked on an already killed ref.
Fix it by making blk_mq_freeze_queue() kill and kick the queue only
for the outermost freeze attempt. All the nested ones can simply wait
for the ref to reach zero.
While at it, remove unnecessary @wake initialization from
blk_mq_unfreeze_queue().
Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
Reported-by: Ming Lei <ming.lei@xxxxxxxxxxxxx>
---
Hello, Ming, Jens.
I think something like this is the correct solution. Freezing should
be nestable after all. Ming, can you please verify whether this fixes
the issue you're seeing?