瀏覽代碼

[SCSI] libiscsi: fix setting of nop timer

If we rollover then we could get a next_timeout of zero, so we need
to set the new timer to that value.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie 17 年之前
父節點
當前提交
ad294e9cd1
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      drivers/scsi/libiscsi.c

+ 3 - 6
drivers/scsi/libiscsi.c

@@ -1384,14 +1384,11 @@ static void iscsi_check_transport_timeouts(unsigned long data)
 			iscsi_send_nopout(conn, NULL);
 			iscsi_send_nopout(conn, NULL);
 		}
 		}
 		next_timeout = last_recv + timeout + (conn->ping_timeout * HZ);
 		next_timeout = last_recv + timeout + (conn->ping_timeout * HZ);
-	} else {
+	} else
 		next_timeout = last_recv + timeout;
 		next_timeout = last_recv + timeout;
-	}
 
 
-	if (next_timeout) {
-		debug_scsi("Setting next tmo %lu\n", next_timeout);
-		mod_timer(&conn->transport_timer, next_timeout);
-	}
+	debug_scsi("Setting next tmo %lu\n", next_timeout);
+	mod_timer(&conn->transport_timer, next_timeout);
 done:
 done:
 	spin_unlock(&session->lock);
 	spin_unlock(&session->lock);
 }
 }