Whamcloud - gitweb
LU-6433 quota: handle QUOTA_DQACQ in READPAGE portal
[fs/lustre-release.git] / lnet / selftest / conrpc.c
index de80dd9..2207fa5 100644 (file)
@@ -40,7 +40,6 @@
  * Author: Liang Zhen <liang@whamcloud.com>
  */
 
-#ifdef __KERNEL__
 
 #include <libcfs/libcfs.h>
 #include <lnet/lib-lnet.h>
@@ -1354,7 +1353,8 @@ lstcon_rpc_cleanup_wait(void)
 
                CWARN("Session is shutting down, "
                      "waiting for termination of transactions\n");
-               cfs_pause(cfs_time_seconds(1));
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout(cfs_time_seconds(1));
 
                mutex_lock(&console_session.ses_mutex);
        }
@@ -1403,4 +1403,3 @@ lstcon_rpc_module_fini(void)
        LASSERT(atomic_read(&console_session.ses_rpc_counter) == 0);
 }
 
-#endif