[PATCH] scsi: return correct status in scsi_host_eh_past_deadline()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the user changed the 'eh_deadline' setting to 'off' while evaluating
the time_before() call we will return 'true', which is inconsistent
with the first conditional, where we return 'false' if 'eh_deadline'
is set to 'off'.

Reported-by: Martin Wilck <martin.wilck@xxxxxxxx>
Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
---
 drivers/scsi/scsi_error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index ae2fa170f6ad..ae29a9b4af56 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -113,7 +113,7 @@ static int scsi_host_eh_past_deadline(struct Scsi_Host *shost)
 	    shost->eh_deadline > -1)
 		return 0;
 
-	return 1;
+	return shost->eh_deadline == -1 ? 0 : 1;
 }
 
 /**
-- 
2.16.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux