diff options
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/lib-eq.c')
-rw-r--r-- | drivers/staging/lustre/lnet/lnet/lib-eq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c index 4ce68d3b0931..7ce07f61b2e1 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-eq.c +++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c @@ -334,21 +334,20 @@ lnet_eq_wait_locked(int *timeout_ms) if (tms == 0) return -1; /* don't want to wait and no new event */ - init_waitqueue_entry_current(&wl); + init_waitqueue_entry(&wl, current); set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&the_lnet.ln_eq_waitq, &wl); lnet_eq_wait_unlock(); if (tms < 0) { - waitq_wait(&wl, TASK_INTERRUPTIBLE); + schedule(); } else { struct timeval tv; now = cfs_time_current(); - waitq_timedwait(&wl, TASK_INTERRUPTIBLE, - cfs_time_seconds(tms) / 1000); + schedule_timeout(cfs_time_seconds(tms) / 1000); cfs_duration_usec(cfs_time_sub(cfs_time_current(), now), &tv); tms -= (int)(tv.tv_sec * 1000 + tv.tv_usec / 1000); if (tms < 0) /* no more wait but may have new event */ |