]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
Merge tag 'kvm-3.15-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / lustre / lnet / klnds / socklnd / socklnd_cb.c
index b7b53b579c8524abf460898212264b716ba0aac2..bdf95ea8a54decbcbb3b230544f9b366eb8882ad 100644 (file)
@@ -189,7 +189,8 @@ ksocknal_transmit (ksock_conn_t *conn, ksock_tx_t *tx)
        int      bufnob;
 
        if (ksocknal_data.ksnd_stall_tx != 0) {
-               cfs_pause(cfs_time_seconds(ksocknal_data.ksnd_stall_tx));
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout(cfs_time_seconds(ksocknal_data.ksnd_stall_tx));
        }
 
        LASSERT (tx->tx_resid != 0);
@@ -345,7 +346,8 @@ ksocknal_receive (ksock_conn_t *conn)
        int     rc;
 
        if (ksocknal_data.ksnd_stall_rx != 0) {
-               cfs_pause(cfs_time_seconds (ksocknal_data.ksnd_stall_rx));
+               set_current_state(TASK_UNINTERRUPTIBLE);
+               schedule_timeout(cfs_time_seconds(ksocknal_data.ksnd_stall_rx));
        }
 
        rc = ksocknal_connsock_addref(conn);
@@ -2140,7 +2142,7 @@ ksocknal_connd (void *arg)
 
        cfs_block_allsigs ();
 
-       init_waitqueue_entry_current (&wait);
+       init_waitqueue_entry(&wait, current);
 
        spin_lock_bh(connd_lock);
 
@@ -2229,7 +2231,7 @@ ksocknal_connd (void *arg)
                spin_unlock_bh(connd_lock);
 
                nloops = 0;
-               waitq_timedwait(&wait, TASK_INTERRUPTIBLE, timeout);
+               schedule_timeout(timeout);
 
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&ksocknal_data.ksnd_connd_waitq, &wait);
@@ -2532,7 +2534,7 @@ ksocknal_reaper (void *arg)
        cfs_block_allsigs ();
 
        INIT_LIST_HEAD(&enomem_conns);
-       init_waitqueue_entry_current (&wait);
+       init_waitqueue_entry(&wait, current);
 
        spin_lock_bh(&ksocknal_data.ksnd_reaper_lock);
 
@@ -2639,8 +2641,7 @@ ksocknal_reaper (void *arg)
                if (!ksocknal_data.ksnd_shuttingdown &&
                    list_empty (&ksocknal_data.ksnd_deathrow_conns) &&
                    list_empty (&ksocknal_data.ksnd_zombie_conns))
-                       waitq_timedwait (&wait, TASK_INTERRUPTIBLE,
-                                            timeout);
+                       schedule_timeout(timeout);
 
                set_current_state (TASK_RUNNING);
                remove_wait_queue (&ksocknal_data.ksnd_reaper_waitq, &wait);