瀏覽代碼

blk-mq: idle all hardware contexts before freeing a queue

Without this we can leak the active_queues reference if a command is
freed while it is considered active.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Christoph Hellwig 11 年之前
父節點
當前提交
19c5d84f14
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      block/blk-mq.c

+ 1 - 0
block/blk-mq.c

@@ -1844,6 +1844,7 @@ void blk_mq_free_queue(struct request_queue *q)
 	blk_mq_del_queue_tag_set(q);
 
 	queue_for_each_hw_ctx(q, hctx, i) {
+		blk_mq_tag_idle(hctx);
 		kfree(hctx->ctxs);
 		blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier);
 		if (q->mq_ops->exit_hctx)