Whamcloud - gitweb
LU-6245 libcfs: remove prim wrappers for libcfs
[fs/lustre-release.git] / lnet / klnds / gnilnd / gnilnd_stack.c
index 819280b..1da0fbe 100644 (file)
@@ -133,7 +133,8 @@ kgnilnd_quiesce_wait(char *reason)
                                 atomic_read(&kgnilnd_data.kgn_nthreads) -
                                 atomic_read(&kgnilnd_data.kgn_nquiesce));
                        CFS_RACE(CFS_FAIL_GNI_QUIESCE_RACE);
-                       cfs_pause(cfs_time_seconds(1 * i));
+                       set_current_state(TASK_UNINTERRUPTIBLE);
+                       schedule_timeout(cfs_time_seconds(1 * i));
 
                        LASSERTF(quiesce_deadline > jiffies,
                                 "couldn't quiesce threads in %lu seconds, falling over now\n",
@@ -158,7 +159,8 @@ kgnilnd_quiesce_wait(char *reason)
                                 "%s: Waiting for %d threads to wake up\n",
                                  reason,
                                  atomic_read(&kgnilnd_data.kgn_nquiesce));
-                       cfs_pause(cfs_time_seconds(1 * i));
+                       set_current_state(TASK_UNINTERRUPTIBLE);
+                       schedule_timeout(cfs_time_seconds(1 * i));
                }
 
                CDEBUG(D_INFO, "%s: All threads awake!\n", reason);
@@ -417,7 +419,8 @@ kgnilnd_ruhroh_thread(void *arg)
                                i++;
                                CDEBUG(D_INFO, "Waiting for hardware quiesce "
                                               "flag to clear\n");
-                               cfs_pause(cfs_time_seconds(1 * i));
+                               set_current_state(TASK_UNINTERRUPTIBLE);
+                               schedule_timeout(cfs_time_seconds(1 * i));
 
                                /* If we got a quiesce event with bump info, DO THE BUMP!. */
                                if (kgnilnd_data.kgn_bump_info_rdy) {