diff --git a/lnet/ChangeLog b/lnet/ChangeLog index 959a299ea5c0706b3662a308e22742a3e8119cbd..99aeb85155c8b10968e5bcd3ee642eaf8fc68206 100644 --- a/lnet/ChangeLog +++ b/lnet/ChangeLog @@ -1,4 +1,4 @@ -2007-04-23 Cluster File Systems, Inc. <info@clusterfs.com> +2006-06-22 Cluster File Systems, Inc. <info@clusterfs.com> * version 1.4.11 / 1.6.1 * Support for networks: socklnd - kernels up to 2.6.16 @@ -13,6 +13,15 @@ ptllnd - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x * bug fixes +Severity : minor +Frequency : rare +Bugzilla : 12227 +Description: cfs_duration_{u,n}sec() wrongly calculate nanosecond part of + struct timeval. +Details : do_div() macro is used incorrectly. + +2007-04-23 Cluster File Systems, Inc. <info@clusterfs.com> + Severity : normal Bugzilla : 11680 Description: make panic on lbug configurable diff --git a/lnet/include/libcfs/linux/linux-time.h b/lnet/include/libcfs/linux/linux-time.h index e928387a795df7d50b2762fd4d90735950d939e5..56523e29081b820237845fb7195aab80f7435a53 100644 --- a/lnet/include/libcfs/linux/linux-time.h +++ b/lnet/include/libcfs/linux/linux-time.h @@ -238,7 +238,8 @@ static inline void cfs_duration_usec(cfs_duration_t d, struct timeval *s) s->tv_sec = d / HZ; t = (d - (cfs_duration_t)s->tv_sec * HZ) * ONE_MILLION; - s->tv_usec = do_div (t, HZ); + do_div(t, HZ); + s->tv_usec = t; #else s->tv_sec = d / HZ; s->tv_usec = ((d - (cfs_duration_t)s->tv_sec * HZ) * ONE_MILLION) / HZ; @@ -252,7 +253,8 @@ static inline void cfs_duration_nsec(cfs_duration_t d, struct timespec *s) s->tv_sec = d / HZ; t = (d - s->tv_sec * HZ) * ONE_BILLION; - s->tv_nsec = do_div (t, HZ); + do_div(t, HZ); + s->tv_nsec = t; #else s->tv_sec = d / HZ; s->tv_nsec = ((d - s->tv_sec * HZ) * ONE_BILLION) / HZ;