scsi: libfc: fix seconds_since_last_reset miscalculation

Commit 540eb1eef0 ("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: Johannes Thumshirn <jthumshirn@suse.de>
Cc: <stable@vger.kernel.org> # v4.8+
Fixes: 540eb1eef0 ("scsi: libfc: fix seconds_since_last_reset calculation")
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Johannes Thumshirn 2016-11-17 12:50:23 +01:00 committed by Martin K. Petersen
parent c733ab3512
commit 208da78e8e

View File

@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost)
fc_stats = &lport->host_stats; fc_stats = &lport->host_stats;
memset(fc_stats, 0, sizeof(struct fc_host_statistics)); 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) { for_each_possible_cpu(cpu) {
struct fc_stats *stats; struct fc_stats *stats;