@@ -1408,7 +1408,8 @@ static enum ldlm_policy_res ldlm_cancel_lrur_policy(struct ldlm_namespace *ns,
slv = ldlm_pool_get_slv(pl);
lvf = ldlm_pool_get_lvf(pl);
- la = ktime_to_ns(ktime_sub(cur, lock->l_last_used)) / NSEC_PER_SEC;
+ la = div_u64(ktime_to_ns(ktime_sub(cur, lock->l_last_used)),
+ NSEC_PER_SEC);
lv = lvf * la * unused;
/* Inform pool about current CLV to see it via debugfs. */
@@ -289,7 +289,7 @@ void ptlrpc_invalidate_import(struct obd_import *imp)
*/
if (!OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) {
timeout = ptlrpc_inflight_timeout(imp);
- timeout += timeout / 3;
+ timeout += div_u64(timeout, 3);
if (timeout == 0)
timeout = obd_timeout;