OSDN Git Service

scsi: core: Convert a source code comment into a runtime check
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 4 Dec 2017 18:06:24 +0000 (10:06 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Dec 2017 02:06:57 +0000 (21:06 -0500)
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c

index 3737c6d..d042915 100644 (file)
@@ -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);