/* Caveat: Hopefully the low level driver will have finished any outstanding requests first...  */
static void blk_release_queue(struct kobject *kobj)
/* Caveat: Hopefully the low level driver will have finished any outstanding requests first...  */
static void blk_release_queue(struct kobject *kobj)
{
	struct request_queue *q =
		container_of(kobj, struct request_queue, kobj);
	struct request_list *rl = &q->rq;
	blk_sync_queue(q);
	if (rl->rq_pool)
		mempool_destroy(rl->rq_pool);
	if (q->queue_tags)
		__blk_queue_free_tags(q);
	blk_trace_shutdown(q);
	bdi_destroy(&q->backing_dev_info);
	kmem_cache_free(blk_requestq_cachep, q);
}