diff options
author | Peng Tao <bergwolf@gmail.com> | 2014-03-18 09:05:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-19 16:42:38 -0400 |
commit | b3669a7f5481c16870c021cd28a24ec62027773f (patch) | |
tree | 282ca2b1482e3808a24de716283107b699e5035d | |
parent | 9e795d358170c7d8380846f1aec007e7f4f68d95 (diff) |
staging/lustre/libcfs: remove waitq_wait
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed, 11 insertions, 19 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h index b17456724fa7..b9251a59bba1 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | |||
@@ -52,7 +52,6 @@ typedef void (cfs_timer_func_t)(ulong_ptr_t); | |||
52 | void schedule_timeout_and_set_state(long, int64_t); | 52 | void schedule_timeout_and_set_state(long, int64_t); |
53 | 53 | ||
54 | int64_t waitq_timedwait(wait_queue_t *, long, int64_t); | 54 | int64_t waitq_timedwait(wait_queue_t *, long, int64_t); |
55 | void waitq_wait(wait_queue_t *, long); | ||
56 | void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *); | 55 | void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *); |
57 | 56 | ||
58 | void cfs_init_timer(struct timer_list *t); | 57 | void cfs_init_timer(struct timer_list *t); |
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 9ae5745b6947..07b1da248c04 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | |||
@@ -3423,7 +3423,7 @@ kiblnd_scheduler(void *arg) | |||
3423 | add_wait_queue_exclusive(&sched->ibs_waitq, &wait); | 3423 | add_wait_queue_exclusive(&sched->ibs_waitq, &wait); |
3424 | spin_unlock_irqrestore(&sched->ibs_lock, flags); | 3424 | spin_unlock_irqrestore(&sched->ibs_lock, flags); |
3425 | 3425 | ||
3426 | waitq_wait(&wait, TASK_INTERRUPTIBLE); | 3426 | schedule(); |
3427 | busy_loops = 0; | 3427 | busy_loops = 0; |
3428 | 3428 | ||
3429 | remove_wait_queue(&sched->ibs_waitq, &wait); | 3429 | remove_wait_queue(&sched->ibs_waitq, &wait); |
diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c index 6209728aceae..65af2018317e 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-eq.c +++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c | |||
@@ -341,7 +341,7 @@ lnet_eq_wait_locked(int *timeout_ms) | |||
341 | lnet_eq_wait_unlock(); | 341 | lnet_eq_wait_unlock(); |
342 | 342 | ||
343 | if (tms < 0) { | 343 | if (tms < 0) { |
344 | waitq_wait(&wl, TASK_INTERRUPTIBLE); | 344 | schedule(); |
345 | 345 | ||
346 | } else { | 346 | } else { |
347 | struct timeval tv; | 347 | struct timeval tv; |
diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index 0521a06e5c96..3401c9ad42ac 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c | |||
@@ -225,7 +225,7 @@ static int seq_fid_alloc_prep(struct lu_client_seq *seq, | |||
225 | set_current_state(TASK_UNINTERRUPTIBLE); | 225 | set_current_state(TASK_UNINTERRUPTIBLE); |
226 | mutex_unlock(&seq->lcs_mutex); | 226 | mutex_unlock(&seq->lcs_mutex); |
227 | 227 | ||
228 | waitq_wait(link, TASK_UNINTERRUPTIBLE); | 228 | schedule(); |
229 | 229 | ||
230 | mutex_lock(&seq->lcs_mutex); | 230 | mutex_lock(&seq->lcs_mutex); |
231 | remove_wait_queue(&seq->lcs_waitq, link); | 231 | remove_wait_queue(&seq->lcs_waitq, link); |
@@ -378,7 +378,7 @@ void seq_client_flush(struct lu_client_seq *seq) | |||
378 | set_current_state(TASK_UNINTERRUPTIBLE); | 378 | set_current_state(TASK_UNINTERRUPTIBLE); |
379 | mutex_unlock(&seq->lcs_mutex); | 379 | mutex_unlock(&seq->lcs_mutex); |
380 | 380 | ||
381 | waitq_wait(&link, TASK_UNINTERRUPTIBLE); | 381 | schedule(); |
382 | 382 | ||
383 | mutex_lock(&seq->lcs_mutex); | 383 | mutex_lock(&seq->lcs_mutex); |
384 | remove_wait_queue(&seq->lcs_waitq, &link); | 384 | remove_wait_queue(&seq->lcs_waitq, &link); |
diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index 62111850c6ac..06954364db5e 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h | |||
@@ -558,7 +558,7 @@ do { \ | |||
558 | break; \ | 558 | break; \ |
559 | \ | 559 | \ |
560 | if (__timeout == 0) { \ | 560 | if (__timeout == 0) { \ |
561 | waitq_wait(&__wait, __wstate); \ | 561 | schedule(); \ |
562 | } else { \ | 562 | } else { \ |
563 | cfs_duration_t interval = info->lwi_interval? \ | 563 | cfs_duration_t interval = info->lwi_interval? \ |
564 | min_t(cfs_duration_t, \ | 564 | min_t(cfs_duration_t, \ |
diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index a1902f122a75..6907a16dbbd1 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c | |||
@@ -1203,7 +1203,7 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj) | |||
1203 | set_current_state(TASK_UNINTERRUPTIBLE); | 1203 | set_current_state(TASK_UNINTERRUPTIBLE); |
1204 | if (atomic_read(&header->loh_ref) == 1) | 1204 | if (atomic_read(&header->loh_ref) == 1) |
1205 | break; | 1205 | break; |
1206 | waitq_wait(&waiter, TASK_UNINTERRUPTIBLE); | 1206 | schedule(); |
1207 | } | 1207 | } |
1208 | 1208 | ||
1209 | set_current_state(TASK_RUNNING); | 1209 | set_current_state(TASK_RUNNING); |
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index b65e12a69cad..1e4c5ad26157 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c | |||
@@ -379,7 +379,7 @@ void libcfs_debug_dumplog(void) | |||
379 | printk(KERN_ERR "LustreError: cannot start log dump thread:" | 379 | printk(KERN_ERR "LustreError: cannot start log dump thread:" |
380 | " %ld\n", PTR_ERR(dumper)); | 380 | " %ld\n", PTR_ERR(dumper)); |
381 | else | 381 | else |
382 | waitq_wait(&wait, TASK_INTERRUPTIBLE); | 382 | schedule(); |
383 | 383 | ||
384 | /* be sure to teardown if cfs_create_thread() failed */ | 384 | /* be sure to teardown if cfs_create_thread() failed */ |
385 | remove_wait_queue(&debug_ctlwq, &wait); | 385 | remove_wait_queue(&debug_ctlwq, &wait); |
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c index 548cb1b6325b..86475c2b42a7 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c | |||
@@ -70,13 +70,6 @@ add_wait_queue_exclusive_head(wait_queue_head_t *waitq, wait_queue_t *link) | |||
70 | } | 70 | } |
71 | EXPORT_SYMBOL(add_wait_queue_exclusive_head); | 71 | EXPORT_SYMBOL(add_wait_queue_exclusive_head); |
72 | 72 | ||
73 | void | ||
74 | waitq_wait(wait_queue_t *link, long state) | ||
75 | { | ||
76 | schedule(); | ||
77 | } | ||
78 | EXPORT_SYMBOL(waitq_wait); | ||
79 | |||
80 | int64_t | 73 | int64_t |
81 | waitq_timedwait(wait_queue_t *link, long state, int64_t timeout) | 74 | waitq_timedwait(wait_queue_t *link, long state, int64_t timeout) |
82 | { | 75 | { |
diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index 8a7a55e771ad..d6b2cb45b938 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c | |||
@@ -320,7 +320,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov, | |||
320 | spin_lock(&r0->lo_sub_lock); | 320 | spin_lock(&r0->lo_sub_lock); |
321 | if (r0->lo_sub[idx] == los) { | 321 | if (r0->lo_sub[idx] == los) { |
322 | spin_unlock(&r0->lo_sub_lock); | 322 | spin_unlock(&r0->lo_sub_lock); |
323 | waitq_wait(waiter, TASK_UNINTERRUPTIBLE); | 323 | schedule(); |
324 | } else { | 324 | } else { |
325 | spin_unlock(&r0->lo_sub_lock); | 325 | spin_unlock(&r0->lo_sub_lock); |
326 | set_current_state(TASK_RUNNING); | 326 | set_current_state(TASK_RUNNING); |
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index c6e1df3fdc2c..d795cef3f164 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c | |||
@@ -943,7 +943,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock) | |||
943 | * can be restarted if signals are pending here */ | 943 | * can be restarted if signals are pending here */ |
944 | result = -ERESTARTSYS; | 944 | result = -ERESTARTSYS; |
945 | if (likely(!OBD_FAIL_CHECK(OBD_FAIL_LOCK_STATE_WAIT_INTR))) { | 945 | if (likely(!OBD_FAIL_CHECK(OBD_FAIL_LOCK_STATE_WAIT_INTR))) { |
946 | waitq_wait(&waiter, TASK_INTERRUPTIBLE); | 946 | schedule(); |
947 | if (!cfs_signal_pending()) | 947 | if (!cfs_signal_pending()) |
948 | result = 0; | 948 | result = 0; |
949 | } | 949 | } |
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 55bd47f4acb0..92e8a15a5e5d 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c | |||
@@ -712,7 +712,7 @@ struct lu_object *lu_object_find_at(const struct lu_env *env, | |||
712 | * lu_object_find_try() already added waiter into the | 712 | * lu_object_find_try() already added waiter into the |
713 | * wait queue. | 713 | * wait queue. |
714 | */ | 714 | */ |
715 | waitq_wait(&wait, TASK_UNINTERRUPTIBLE); | 715 | schedule(); |
716 | bkt = lu_site_bkt_from_fid(dev->ld_site, (void *)f); | 716 | bkt = lu_site_bkt_from_fid(dev->ld_site, (void *)f); |
717 | remove_wait_queue(&bkt->lsb_marche_funebre, &wait); | 717 | remove_wait_queue(&bkt->lsb_marche_funebre, &wait); |
718 | } | 718 | } |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index 5e747e37f10c..965668132747 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | |||
@@ -549,7 +549,7 @@ again: | |||
549 | add_wait_queue(&page_pools.epp_waitq, &waitlink); | 549 | add_wait_queue(&page_pools.epp_waitq, &waitlink); |
550 | 550 | ||
551 | spin_unlock(&page_pools.epp_lock); | 551 | spin_unlock(&page_pools.epp_lock); |
552 | waitq_wait(&waitlink, TASK_UNINTERRUPTIBLE); | 552 | schedule(); |
553 | remove_wait_queue(&page_pools.epp_waitq, &waitlink); | 553 | remove_wait_queue(&page_pools.epp_waitq, &waitlink); |
554 | LASSERT(page_pools.epp_waitqlen > 0); | 554 | LASSERT(page_pools.epp_waitqlen > 0); |
555 | spin_lock(&page_pools.epp_lock); | 555 | spin_lock(&page_pools.epp_lock); |