/* Notes: The command must not belong to any lists.  */
void scsi_host_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
/* Notes: The command must not belong to any lists.  */
void scsi_host_put_command(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
{
	struct request_queue *q = shost->uspace_req_q;
	struct request *rq = cmd->request;
	struct scsi_tgt_cmd *tcmd = rq->end_io_data;
	unsigned long flags;
	kmem_cache_free(scsi_tgt_cmd_cache, tcmd);
	spin_lock_irqsave(q->queue_lock, flags);
	__blk_put_request(q, rq);
	spin_unlock_irqrestore(q->queue_lock, flags);
	__scsi_put_command(shost, cmd, &shost->shost_gendev);
}