Whamcloud - gitweb
LU-10800 lnet: Revert "LU-10270 lnet: remove an early rx code"
[fs/lustre-release.git] / lnet / klnds / gnilnd / gnilnd_sysctl.c
index a6fd107..b8f7dd0 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Copyright (C) 2012 Cray, Inc.
  *
+ * Copyright (c) 2014, Intel Corporation.
+ *
  *   Author: Nic Henke <nic@cray.com>
  *   Author: James Shimek <jshimek@cray.com>
  *
@@ -24,6 +26,8 @@
 
 #define DEBUG_SUBSYSTEM S_LND
 
+#include <libcfs/linux/linux-misc.h>
+
 #include "gnilnd.h"
 
 #define GNILND_PEERSTATE_STRLEN 16
@@ -129,7 +133,8 @@ proc_trigger_stack_reset(struct ctl_table *table, int write,
                i++;
                LCONSOLE((((i) & (-i)) == i) ? D_WARNING : D_NET,
                                "Waiting for stack reset request to clear\n");
-               cfs_pause(cfs_time_seconds(1 * i));
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout(cfs_time_seconds(1 * i));
        }
 
        RETURN(rc);