diff options
| author | Bart Van Assche <[email protected]> | 2017-12-04 18:06:24 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2017-12-08 02:06:57 +0000 |
| commit | f0317e88e3290854b7929fa8a2746e92d94b736c (patch) | |
| tree | ebe70aa45d892b5b7e27d116c26f28752a90fb12 /drivers/scsi/scsi_error.c | |
| parent | scsi: core: Ensure that the SCSI error handler gets woken up (diff) | |
| download | kernel-f0317e88e3290854b7929fa8a2746e92d94b736c.tar.gz kernel-f0317e88e3290854b7929fa8a2746e92d94b736c.zip | |
scsi: core: Convert a source code comment into a runtime check
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
| -rw-r--r-- | drivers/scsi/scsi_error.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 3737c6d3b064..d042915ce895 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -61,9 +61,10 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd); static int scsi_try_to_abort_cmd(struct scsi_host_template *, struct scsi_cmnd *); -/* called with shost->host_lock held */ void scsi_eh_wakeup(struct Scsi_Host *shost) { + lockdep_assert_held(shost->host_lock); + if (atomic_read(&shost->host_busy) == shost->host_failed) { trace_scsi_eh_wakeup(shost); wake_up_process(shost->ehandler); |
