|
|
@@ -223,7 +223,8 @@ static void scsi_eh_reset(struct scsi_cmnd *scmd)
|
|
|
|
|
|
static void scsi_eh_inc_host_failed(struct rcu_head *head)
|
|
|
{
|
|
|
- struct Scsi_Host *shost = container_of(head, typeof(*shost), rcu);
|
|
|
+ struct scsi_cmnd *scmd = container_of(head, typeof(*scmd), rcu);
|
|
|
+ struct Scsi_Host *shost = scmd->device->host;
|
|
|
unsigned long flags;
|
|
|
|
|
|
spin_lock_irqsave(shost->host_lock, flags);
|
|
|
@@ -259,7 +260,7 @@ void scsi_eh_scmd_add(struct scsi_cmnd *scmd)
|
|
|
* Ensure that all tasks observe the host state change before the
|
|
|
* host_failed change.
|
|
|
*/
|
|
|
- call_rcu(&shost->rcu, scsi_eh_inc_host_failed);
|
|
|
+ call_rcu(&scmd->rcu, scsi_eh_inc_host_failed);
|
|
|
}
|
|
|
|
|
|
/**
|