[PATCH] SCSI: unconditionally clean was_reset

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

 



If a reset of a SCSI device requires no relocking of the door, the
flag must be reset anyway, lest it trigger unnecessary door action
later on.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/scsi/scsi_error.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 16eef068e9e9..afb8cf0cdfed 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1990,10 +1990,9 @@ static void scsi_restart_operations(struct Scsi_Host *shost)
 	 * is no point trying to lock the door of an off-line device.
 	 */
 	shost_for_each_device(sdev, shost) {
-		if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked) {
+		if (scsi_device_online(sdev) && sdev->was_reset && sdev->locked)
 			scsi_eh_lock_door(sdev);
-			sdev->was_reset = 0;
-		}
+		sdev->was_reset = 0;
 	}
 
 	/*
-- 
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