Skip to content

Commit

Permalink
scsi: libfc: fix seconds_since_last_reset miscalculation
Browse files Browse the repository at this point in the history
Commit 540eb1e ("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: 540eb1e ("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>
  • Loading branch information
Johannes Thumshirn authored and Martin K. Petersen committed Nov 18, 2016
1 parent c733ab3 commit 208da78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 208da78

Please sign in to comment.