linux/block/blk-mq.c
/* hctx->ctxs will be freed in queue's release handler */
hctx->ctxs will be freed in queue's release handler
hctx - > ctxs will be freed in queue ' s release handler
static void blk_mq_exit_hctx(struct request_queue *q,
		struct blk_mq_tag_set *set,
		struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
{
	blk_mq_debugfs_unregister_hctx(hctx);
	if (blk_mq_hw_queue_mapped(hctx))
		blk_mq_tag_idle(hctx);
	if (set->ops->exit_request)
		set->ops->exit_request(set, hctx->fq->flush_rq, hctx_idx);
	if (set->ops->exit_hctx)
		set->ops->exit_hctx(hctx, hctx_idx);
	if (hctx->flags & BLK_MQ_F_BLOCKING)
		cleanup_srcu_struct(hctx->srcu);
	blk_mq_remove_cpuhp(hctx);
	blk_free_flush_queue(hctx->fq);
	sbitmap_free(&hctx->ctx_map);
}
static void blk_mq_exit_hctx ( struct request_queue * q , struct blk_mq_tag_set * set , struct blk_mq_hw_ctx * hctx , unsigned int hctx_idx ) { blk_mq_debugfs_unregister_hctx ( hctx ) ; if ( blk_mq_hw_queue_mapped ( hctx ) ) blk_mq_tag_idle ( hctx ) ; if ( set -> ops -> exit_request ) set -> ops -> exit_request ( set , hctx -> fq -> flush_rq , hctx_idx ) ; if ( set -> ops -> exit_hctx ) set -> ops -> exit_hctx ( hctx , hctx_idx ) ; if ( hctx -> flags & BLK_MQ_F_BLOCKING ) cleanup_srcu_struct ( hctx -> srcu ) ; blk_mq_remove_cpuhp ( hctx ) ; blk_free_flush_queue ( hctx -> fq ) ; sbitmap_free ( & hctx -> ctx_map ) ; }
hctx->ctxs will be freed in queue's release handler
hctx - > ctxs will be freed in queue ' s release handler