#include <linux/jiffies.h>
-/*
- * Generic kernel stuff
- */
-
-static inline int cfs_time_before_64(u64 t1, u64 t2)
-{
- return (__s64)t2 - (__s64)t1 > 0;
-}
-
-static inline int cfs_time_beforeq_64(u64 t1, u64 t2)
-{
- return (__s64)t2 - (__s64)t1 >= 0;
-}
-
/*
* One jiffy
*/
CDEBUG(D_SUPER, "%s: osfs %p age %llu, max_age %llu\n",
obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age);
- if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {
+ if (time_before64(obd->obd_osfs_age, max_age)) {
rc = OBP(obd, statfs_async)(exp, oinfo, max_age, rqset);
} else {
CDEBUG(D_SUPER,
CDEBUG(D_SUPER, "osfs %llu, max_age %llu\n",
obd->obd_osfs_age, max_age);
- if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {
+ if (time_before64(obd->obd_osfs_age, max_age)) {
rc = OBP(obd, statfs)(env, exp, osfs, max_age, flags);
if (rc == 0) {
spin_lock(&obd->obd_osfs_lock);
* the last successful attempt, go with this one
*/
if ((conn->oic_last_attempt == 0) ||
- cfs_time_beforeq_64(conn->oic_last_attempt,
+ time_before_eq64(conn->oic_last_attempt,
imp->imp_last_success_conn)) {
imp_conn = conn;
tried_all = 0;
*/
if (!imp_conn)
imp_conn = conn;
- else if (cfs_time_before_64(conn->oic_last_attempt,
+ else if (time_before64(conn->oic_last_attempt,
imp_conn->oic_last_attempt))
imp_conn = conn;
}