diff options
author | Ming Lei <ming.lei@redhat.com> | 2018-06-24 10:03:26 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-06-26 12:53:26 -0400 |
commit | c84b023a4c1461498abf0eda54f60e2fd64a1ca2 (patch) | |
tree | 67ebdb69f8d50cd93209e09945474f23e845280f /drivers/scsi/scsi_error.c | |
parent | 2b33ab371e026cfcea4cbdf233c6b8776dde9ba8 (diff) |
scsi: read host_busy via scsi_host_busy()
No functional change.
Just introduce scsi_host_busy() and replace the direct read of
scsi_host->host_busy with this new API.
Cc: Omar Sandoval <osandov@fb.com>,
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Cc: James Bottomley <james.bottomley@hansenpartnership.com>,
Cc: Christoph Hellwig <hch@lst.de>,
Cc: Don Brace <don.brace@microsemi.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 8932ae81a15a..6a014fd15fe9 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -66,7 +66,7 @@ void scsi_eh_wakeup(struct Scsi_Host *shost) | |||
66 | { | 66 | { |
67 | lockdep_assert_held(shost->host_lock); | 67 | lockdep_assert_held(shost->host_lock); |
68 | 68 | ||
69 | if (atomic_read(&shost->host_busy) == shost->host_failed) { | 69 | if (scsi_host_busy(shost) == shost->host_failed) { |
70 | trace_scsi_eh_wakeup(shost); | 70 | trace_scsi_eh_wakeup(shost); |
71 | wake_up_process(shost->ehandler); | 71 | wake_up_process(shost->ehandler); |
72 | SCSI_LOG_ERROR_RECOVERY(5, shost_printk(KERN_INFO, shost, | 72 | SCSI_LOG_ERROR_RECOVERY(5, shost_printk(KERN_INFO, shost, |
@@ -2155,7 +2155,7 @@ int scsi_error_handler(void *data) | |||
2155 | break; | 2155 | break; |
2156 | 2156 | ||
2157 | if ((shost->host_failed == 0 && shost->host_eh_scheduled == 0) || | 2157 | if ((shost->host_failed == 0 && shost->host_eh_scheduled == 0) || |
2158 | shost->host_failed != atomic_read(&shost->host_busy)) { | 2158 | shost->host_failed != scsi_host_busy(shost)) { |
2159 | SCSI_LOG_ERROR_RECOVERY(1, | 2159 | SCSI_LOG_ERROR_RECOVERY(1, |
2160 | shost_printk(KERN_INFO, shost, | 2160 | shost_printk(KERN_INFO, shost, |
2161 | "scsi_eh_%d: sleeping\n", | 2161 | "scsi_eh_%d: sleeping\n", |
@@ -2170,7 +2170,7 @@ int scsi_error_handler(void *data) | |||
2170 | "scsi_eh_%d: waking up %d/%d/%d\n", | 2170 | "scsi_eh_%d: waking up %d/%d/%d\n", |
2171 | shost->host_no, shost->host_eh_scheduled, | 2171 | shost->host_no, shost->host_eh_scheduled, |
2172 | shost->host_failed, | 2172 | shost->host_failed, |
2173 | atomic_read(&shost->host_busy))); | 2173 | scsi_host_busy(shost))); |
2174 | 2174 | ||
2175 | /* | 2175 | /* |
2176 | * We have a host that is failing for some reason. Figure out | 2176 | * We have a host that is failing for some reason. Figure out |