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

Commit 208da78e authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Martin K. Petersen
Browse files

scsi: libfc: fix seconds_since_last_reset miscalculation



Commit 540eb1ee ("scsi: libfc: fix seconds_since_last_reset calculation")
removed the use of 'struct timespec' from fc_get_host_stats(). This broke the
output of 'fcoeadm -s' after kernel 4.8-rc1.

Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Cc: <stable@vger.kernel.org> # v4.8+
Fixes: 540eb1ee ("scsi: libfc: fix seconds_since_last_reset calculation")
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c733ab35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
	fc_stats = &lport->host_stats;
	memset(fc_stats, 0, sizeof(struct fc_host_statistics));

	fc_stats->seconds_since_last_reset = (lport->boot_time - jiffies) / HZ;
	fc_stats->seconds_since_last_reset = (jiffies - lport->boot_time) / HZ;

	for_each_possible_cpu(cpu) {
		struct fc_stats *stats;