Commit 8d1ee7b2 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Greg Kroah-Hartman

scsi: libfc: fix seconds_since_last_reset miscalculation

commit 208da78e upstream.

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>
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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 10e26273
...@@ -308,7 +308,7 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment