From: Doug Oucharek Date: Thu, 26 Jul 2012 00:11:04 +0000 (-0700) Subject: LU-1585 lnet: Fix an incorrect timestamp calculation in lst.c X-Git-Tag: 2.1.3-RC1~5 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a65c1ee4fa159254798771f0359798c299d1e876;p=fs%2Flustre-release.git LU-1585 lnet: Fix an incorrect timestamp calculation in lst.c The operation in routine lst_timeval_diff() (in lst.c) has a bug. It uses tv_sec where it should be using tv_usec. Signed-off-by: Doug Oucharek Change-Id: I8886428253b62562840aa37842e33b63a29be56b Reviewed-on: http://review.whamcloud.com/3472 Reviewed-by: Liang Zhen Tested-by: Hudson Tested-by: Maloo Reviewed-by: Isaac Huang Reviewed-by: Oleg Drokin --- diff --git a/lnet/utils/lst.c b/lnet/utils/lst.c index 94cf02a..d420894 100644 --- a/lnet/utils/lst.c +++ b/lnet/utils/lst.c @@ -1567,7 +1567,7 @@ lst_timeval_diff(struct timeval *tv1, } df->tv_sec = tv1->tv_sec - 1 - tv2->tv_sec; - df->tv_usec = tv1->tv_sec + 1000000 - tv2->tv_usec; + df->tv_usec = tv1->tv_usec + 1000000 - tv2->tv_usec; return; }