Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0317e88 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: core: Convert a source code comment into a runtime check



Signed-off-by: default avatarBart 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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3bd6f43f
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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 *,
static int scsi_try_to_abort_cmd(struct scsi_host_template *,
				 struct scsi_cmnd *);
				 struct scsi_cmnd *);


/* called with shost->host_lock held */
void scsi_eh_wakeup(struct Scsi_Host *shost)
void scsi_eh_wakeup(struct Scsi_Host *shost)
{
{
	lockdep_assert_held(shost->host_lock);

	if (atomic_read(&shost->host_busy) == shost->host_failed) {
	if (atomic_read(&shost->host_busy) == shost->host_failed) {
		trace_scsi_eh_wakeup(shost);
		trace_scsi_eh_wakeup(shost);
		wake_up_process(shost->ehandler);
		wake_up_process(shost->ehandler);