···542543void scsi_next_command(struct scsi_cmnd *cmd)544{545- struct scsi_device *sdev = cmd->device;546- struct request_queue *q = sdev->request_queue;547-548- /* need to hold a reference on the device before we let go of the cmd */549- get_device(&sdev->sdev_gendev);550551 scsi_put_command(cmd);552 scsi_run_queue(q);553-554- /* ok to remove device now */555- put_device(&sdev->sdev_gendev);556}557558void scsi_run_host_queues(struct Scsi_Host *shost)