Whamcloud - gitweb
LU-12930 various: use schedule_timeout_*interruptible
[fs/lustre-release.git] / lnet / selftest / conrpc.c
index 56a6bde..8efacc0 100644 (file)
@@ -457,8 +457,6 @@ lstcon_rpc_trans_stat(struct lstcon_rpc_trans *trans,
                lstcon_rpc_stat_failure(stat, 0),
                lstcon_rpc_stat_total(stat, 0),
                stat->trs_rpc_errno, stat->trs_fwk_errno);
-
-        return;
 }
 
 int
@@ -585,8 +583,6 @@ lstcon_rpc_trans_destroy(struct lstcon_rpc_trans *trans)
               lstcon_rpc_trans_name(trans->tas_opc), count);
 
        LIBCFS_FREE(trans, sizeof(*trans));
-
-       return;
 }
 
 int
@@ -1079,8 +1075,6 @@ lstcon_rpc_stat_reply(struct lstcon_rpc_trans *trans, struct srpc_msg *msg,
 
         if (stat->trs_fwk_errno == 0)
                 stat->trs_fwk_errno = rc;
-
-        return;
 }
 
 int
@@ -1252,7 +1246,8 @@ lstcon_rpc_pinger(void *arg)
                if (nd->nd_state != LST_NODE_ACTIVE)
                        continue;
 
-               intv = ktime_ms_delta(ktime_get(), nd->nd_stamp) / MSEC_PER_SEC;
+               intv = div_u64(ktime_ms_delta(ktime_get(), nd->nd_stamp),
+                              MSEC_PER_SEC);
                if (intv < nd->nd_timeout / 2)
                        continue;
 
@@ -1354,8 +1349,7 @@ lstcon_rpc_cleanup_wait(void)
 
                CWARN("Session is shutting down, "
                      "waiting for termination of transactions\n");
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(cfs_time_seconds(1));
+               schedule_timeout_uninterruptible(cfs_time_seconds(1));
 
                mutex_lock(&console_session.ses_mutex);
        }