Whamcloud - gitweb
LU-7774 lnet: issue in the offset in hash table
[fs/lustre-release.git] / lnet / selftest / rpc.c
index 5685a60..80f7dd5 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -1117,7 +1117,7 @@ srpc_del_client_rpc_timer (srpc_client_rpc_t *rpc)
        if (rpc->crpc_timeout == 0)
                return;
 
-       /* timer sucessfully defused */
+       /* timer successfully defused */
        if (stt_del_timer(&rpc->crpc_timer))
                return;
 
@@ -1593,9 +1593,10 @@ srpc_startup (void)
        memset(&srpc_data, 0, sizeof(struct smoketest_rpc));
        spin_lock_init(&srpc_data.rpc_glock);
 
-        /* 1 second pause to avoid timestamp reuse */
-        cfs_pause(cfs_time_seconds(1));
-        srpc_data.rpc_matchbits = ((__u64) cfs_time_current_sec()) << 48;
+       /* 1 second pause to avoid timestamp reuse */
+       set_current_state(TASK_UNINTERRUPTIBLE);
+       schedule_timeout(cfs_time_seconds(1));
+       srpc_data.rpc_matchbits = ((__u64) cfs_time_current_sec()) << 48;
 
         srpc_data.rpc_state = SRPC_STATE_NONE;