From: Hannes Reinecke <hare@xxxxxxx> We shouldn't modify the interval value, as the struct is accessed from different devices and hence we might end up scheduling too early. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> --- drivers/scsi/device_handler/scsi_dh_alua.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index c01b47e5b55a..b90a5dec199f 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -681,7 +681,6 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_port_group *pg) case SCSI_ACCESS_STATE_TRANSITIONING: if (time_before(jiffies, pg->expiry)) { /* State transition, retry */ - pg->interval = 2; err = SCSI_DH_RETRY; } else { struct alua_dh_data *h; @@ -836,11 +835,9 @@ static void alua_rtpg_work(struct work_struct *work) spin_lock_irqsave(&pg->lock, flags); if (err == SCSI_DH_RETRY || pg->flags & ALUA_PG_RUN_RTPG) { pg->flags |= ALUA_PG_RUN_RTPG; - pg->interval = 0; pg->flags &= ~ALUA_PG_RUNNING; spin_unlock_irqrestore(&pg->lock, flags); - queue_delayed_work(alua_wq, &pg->rtpg_work, - pg->interval * HZ); + queue_delayed_work(alua_wq, &pg->rtpg_work, 0); return; } } @@ -886,7 +883,7 @@ static bool alua_rtpg_queue(struct alua_port_group *pg, force = true; } if (pg->rtpg_sdev == NULL) { - pg->interval = 0; + pg->interval = 2; pg->flags |= ALUA_PG_RUN_RTPG; kref_get(&pg->kref); pg->rtpg_sdev = sdev; -- 2.12.2