···542542543543void scsi_next_command(struct scsi_cmnd *cmd)544544{545545- struct scsi_device *sdev = cmd->device;546546- struct request_queue *q = sdev->request_queue;547547-548548- /* need to hold a reference on the device before we let go of the cmd */549549- get_device(&sdev->sdev_gendev);545545+ struct request_queue *q = cmd->device->request_queue;550546551547 scsi_put_command(cmd);552548 scsi_run_queue(q);553553-554554- /* ok to remove device now */555555- put_device(&sdev->sdev_gendev);556549}557550558551void scsi_run_host_queues(struct Scsi_Host *shost)