浏览代码

blk-mq: fix leak of hctx->ctx_map

hctx->ctx_map should have been freed inside blk_mq_free_queue().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Ming Lei 11 年之前
父节点
当前提交
1f9f07e917
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      block/blk-mq.c

+ 1 - 0
block/blk-mq.c

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