aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2014-03-18 09:05:52 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-19 16:42:38 -0400
commit9e795d358170c7d8380846f1aec007e7f4f68d95 (patch)
treeb37b22deb97984483bd8d0ee5ccee466c4a1b378
parent6d56be08f7811439406ceee46f1335ee757618bf (diff)
staging/lustre/libcfs: remove init_waitqueue_entry_current
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>
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h1
-rw-r--r--drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c6
-rw-r--r--drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c4
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-eq.c2
-rw-r--r--drivers/staging/lustre/lustre/fid/fid_request.c6
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_lib.h2
-rw-r--r--drivers/staging/lustre/lustre/lclient/lcommon_cl.c2
-rw-r--r--drivers/staging/lustre/lustre/libcfs/debug.c2
-rw-r--r--drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c7
-rw-r--r--drivers/staging/lustre/lustre/libcfs/tracefile.c2
-rw-r--r--drivers/staging/lustre/lustre/libcfs/upcall_cache.c2
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_object.c2
-rw-r--r--drivers/staging/lustre/lustre/obdclass/cl_lock.c2
-rw-r--r--drivers/staging/lustre/lustre/obdclass/lu_object.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c2
16 files changed, 19 insertions, 27 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
index e6e417aeefd5..b17456724fa7 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
@@ -51,7 +51,6 @@ void cfs_pause(cfs_duration_t ticks);
51typedef void (cfs_timer_func_t)(ulong_ptr_t); 51typedef void (cfs_timer_func_t)(ulong_ptr_t);
52void schedule_timeout_and_set_state(long, int64_t); 52void schedule_timeout_and_set_state(long, int64_t);
53 53
54void init_waitqueue_entry_current(wait_queue_t *link);
55int64_t waitq_timedwait(wait_queue_t *, long, int64_t); 54int64_t waitq_timedwait(wait_queue_t *, long, int64_t);
56void waitq_wait(wait_queue_t *, long); 55void waitq_wait(wait_queue_t *, long);
57void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *); 56void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 6f58ead20393..9ae5745b6947 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -3127,7 +3127,7 @@ kiblnd_connd (void *arg)
3127 3127
3128 cfs_block_allsigs (); 3128 cfs_block_allsigs ();
3129 3129
3130 init_waitqueue_entry_current (&wait); 3130 init_waitqueue_entry(&wait, current);
3131 kiblnd_data.kib_connd = current; 3131 kiblnd_data.kib_connd = current;
3132 3132
3133 spin_lock_irqsave(&kiblnd_data.kib_connd_lock, flags); 3133 spin_lock_irqsave(&kiblnd_data.kib_connd_lock, flags);
@@ -3324,7 +3324,7 @@ kiblnd_scheduler(void *arg)
3324 3324
3325 cfs_block_allsigs(); 3325 cfs_block_allsigs();
3326 3326
3327 init_waitqueue_entry_current(&wait); 3327 init_waitqueue_entry(&wait, current);
3328 3328
3329 sched = kiblnd_data.kib_scheds[KIB_THREAD_CPT(id)]; 3329 sched = kiblnd_data.kib_scheds[KIB_THREAD_CPT(id)];
3330 3330
@@ -3450,7 +3450,7 @@ kiblnd_failover_thread(void *arg)
3450 3450
3451 cfs_block_allsigs (); 3451 cfs_block_allsigs ();
3452 3452
3453 init_waitqueue_entry_current(&wait); 3453 init_waitqueue_entry(&wait, current);
3454 write_lock_irqsave(glock, flags); 3454 write_lock_irqsave(glock, flags);
3455 3455
3456 while (!kiblnd_data.kib_shutdown) { 3456 while (!kiblnd_data.kib_shutdown) {
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index b7b53b579c85..fdf9101fea46 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2140,7 +2140,7 @@ ksocknal_connd (void *arg)
2140 2140
2141 cfs_block_allsigs (); 2141 cfs_block_allsigs ();
2142 2142
2143 init_waitqueue_entry_current (&wait); 2143 init_waitqueue_entry(&wait, current);
2144 2144
2145 spin_lock_bh(connd_lock); 2145 spin_lock_bh(connd_lock);
2146 2146
@@ -2532,7 +2532,7 @@ ksocknal_reaper (void *arg)
2532 cfs_block_allsigs (); 2532 cfs_block_allsigs ();
2533 2533
2534 INIT_LIST_HEAD(&enomem_conns); 2534 INIT_LIST_HEAD(&enomem_conns);
2535 init_waitqueue_entry_current (&wait); 2535 init_waitqueue_entry(&wait, current);
2536 2536
2537 spin_lock_bh(&ksocknal_data.ksnd_reaper_lock); 2537 spin_lock_bh(&ksocknal_data.ksnd_reaper_lock);
2538 2538
diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c
index 4ce68d3b0931..6209728aceae 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
@@ -334,7 +334,7 @@ lnet_eq_wait_locked(int *timeout_ms)
334 if (tms == 0) 334 if (tms == 0)
335 return -1; /* don't want to wait and no new event */ 335 return -1; /* don't want to wait and no new event */
336 336
337 init_waitqueue_entry_current(&wl); 337 init_waitqueue_entry(&wl, current);
338 set_current_state(TASK_INTERRUPTIBLE); 338 set_current_state(TASK_INTERRUPTIBLE);
339 add_wait_queue(&the_lnet.ln_eq_waitq, &wl); 339 add_wait_queue(&the_lnet.ln_eq_waitq, &wl);
340 340
diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c
index 69e6a325a9ea..0521a06e5c96 100644
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
@@ -256,7 +256,7 @@ int seq_client_get_seq(const struct lu_env *env,
256 256
257 LASSERT(seqnr != NULL); 257 LASSERT(seqnr != NULL);
258 mutex_lock(&seq->lcs_mutex); 258 mutex_lock(&seq->lcs_mutex);
259 init_waitqueue_entry_current(&link); 259 init_waitqueue_entry(&link, current);
260 260
261 while (1) { 261 while (1) {
262 rc = seq_fid_alloc_prep(seq, &link); 262 rc = seq_fid_alloc_prep(seq, &link);
@@ -306,7 +306,7 @@ int seq_client_alloc_fid(const struct lu_env *env,
306 LASSERT(seq != NULL); 306 LASSERT(seq != NULL);
307 LASSERT(fid != NULL); 307 LASSERT(fid != NULL);
308 308
309 init_waitqueue_entry_current(&link); 309 init_waitqueue_entry(&link, current);
310 mutex_lock(&seq->lcs_mutex); 310 mutex_lock(&seq->lcs_mutex);
311 311
312 if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST)) 312 if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST))
@@ -370,7 +370,7 @@ void seq_client_flush(struct lu_client_seq *seq)
370 wait_queue_t link; 370 wait_queue_t link;
371 371
372 LASSERT(seq != NULL); 372 LASSERT(seq != NULL);
373 init_waitqueue_entry_current(&link); 373 init_waitqueue_entry(&link, current);
374 mutex_lock(&seq->lcs_mutex); 374 mutex_lock(&seq->lcs_mutex);
375 375
376 while (seq->lcs_update) { 376 while (seq->lcs_update) {
diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h
index 609a090484a6..62111850c6ac 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lib.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lib.h
@@ -536,7 +536,7 @@ do { \
536 if (condition) \ 536 if (condition) \
537 break; \ 537 break; \
538 \ 538 \
539 init_waitqueue_entry_current(&__wait); \ 539 init_waitqueue_entry(&__wait, current); \
540 l_add_wait(&wq, &__wait); \ 540 l_add_wait(&wq, &__wait); \
541 \ 541 \
542 /* Block all signals (just the non-fatal ones if no timeout). */ \ 542 /* Block all signals (just the non-fatal ones if no timeout). */ \
diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index 94b164127e0c..a1902f122a75 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -1196,7 +1196,7 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
1196 1196
1197 bkt = lu_site_bkt_from_fid(site, &header->loh_fid); 1197 bkt = lu_site_bkt_from_fid(site, &header->loh_fid);
1198 1198
1199 init_waitqueue_entry_current(&waiter); 1199 init_waitqueue_entry(&waiter, current);
1200 add_wait_queue(&bkt->lsb_marche_funebre, &waiter); 1200 add_wait_queue(&bkt->lsb_marche_funebre, &waiter);
1201 1201
1202 while (1) { 1202 while (1) {
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index f30c84f195aa..b65e12a69cad 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -368,7 +368,7 @@ void libcfs_debug_dumplog(void)
368 /* we're being careful to ensure that the kernel thread is 368 /* we're being careful to ensure that the kernel thread is
369 * able to set our state to running as it exits before we 369 * able to set our state to running as it exits before we
370 * get to schedule() */ 370 * get to schedule() */
371 init_waitqueue_entry_current(&wait); 371 init_waitqueue_entry(&wait, current);
372 set_current_state(TASK_INTERRUPTIBLE); 372 set_current_state(TASK_INTERRUPTIBLE);
373 add_wait_queue(&debug_ctlwq, &wait); 373 add_wait_queue(&debug_ctlwq, &wait);
374 374
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c
index c7bc7fcccb8e..548cb1b6325b 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c
@@ -46,13 +46,6 @@
46#include <asm/kgdb.h> 46#include <asm/kgdb.h>
47#endif 47#endif
48 48
49void
50init_waitqueue_entry_current(wait_queue_t *link)
51{
52 init_waitqueue_entry(link, current);
53}
54EXPORT_SYMBOL(init_waitqueue_entry_current);
55
56/** 49/**
57 * wait_queue_t of Linux (version < 2.6.34) is a FIFO list for exclusively 50 * wait_queue_t of Linux (version < 2.6.34) is a FIFO list for exclusively
58 * waiting threads, which is not always desirable because all threads will 51 * waiting threads, which is not always desirable because all threads will
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index 54290ce6bb43..32ed879e66d4 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -1076,7 +1076,7 @@ end_loop:
1076 break; 1076 break;
1077 } 1077 }
1078 } 1078 }
1079 init_waitqueue_entry_current(&__wait); 1079 init_waitqueue_entry(&__wait, current);
1080 add_wait_queue(&tctl->tctl_waitq, &__wait); 1080 add_wait_queue(&tctl->tctl_waitq, &__wait);
1081 set_current_state(TASK_INTERRUPTIBLE); 1081 set_current_state(TASK_INTERRUPTIBLE);
1082 waitq_timedwait(&__wait, TASK_INTERRUPTIBLE, 1082 waitq_timedwait(&__wait, TASK_INTERRUPTIBLE,
diff --git a/drivers/staging/lustre/lustre/libcfs/upcall_cache.c b/drivers/staging/lustre/lustre/libcfs/upcall_cache.c
index 245b46f0dd96..8a3b62d08e68 100644
--- a/drivers/staging/lustre/lustre/libcfs/upcall_cache.c
+++ b/drivers/staging/lustre/lustre/libcfs/upcall_cache.c
@@ -218,7 +218,7 @@ find_again:
218 MAX_SCHEDULE_TIMEOUT; 218 MAX_SCHEDULE_TIMEOUT;
219 long left; 219 long left;
220 220
221 init_waitqueue_entry_current(&wait); 221 init_waitqueue_entry(&wait, current);
222 add_wait_queue(&entry->ue_waitq, &wait); 222 add_wait_queue(&entry->ue_waitq, &wait);
223 set_current_state(TASK_INTERRUPTIBLE); 223 set_current_state(TASK_INTERRUPTIBLE);
224 spin_unlock(&cache->uc_lock); 224 spin_unlock(&cache->uc_lock);
diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
index 7a85cafecf1b..8a7a55e771ad 100644
--- a/drivers/staging/lustre/lustre/lov/lov_object.c
+++ b/drivers/staging/lustre/lustre/lov/lov_object.c
@@ -310,7 +310,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
310 * ->lo_sub[] slot in lovsub_object_fini() */ 310 * ->lo_sub[] slot in lovsub_object_fini() */
311 if (r0->lo_sub[idx] == los) { 311 if (r0->lo_sub[idx] == los) {
312 waiter = &lov_env_info(env)->lti_waiter; 312 waiter = &lov_env_info(env)->lti_waiter;
313 init_waitqueue_entry_current(waiter); 313 init_waitqueue_entry(waiter, current);
314 add_wait_queue(&bkt->lsb_marche_funebre, waiter); 314 add_wait_queue(&bkt->lsb_marche_funebre, waiter);
315 set_current_state(TASK_UNINTERRUPTIBLE); 315 set_current_state(TASK_UNINTERRUPTIBLE);
316 while (1) { 316 while (1) {
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
index 749eb082f979..c6e1df3fdc2c 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
@@ -932,7 +932,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
932 * LU-305 */ 932 * LU-305 */
933 blocked = cfs_block_sigsinv(LUSTRE_FATAL_SIGS); 933 blocked = cfs_block_sigsinv(LUSTRE_FATAL_SIGS);
934 934
935 init_waitqueue_entry_current(&waiter); 935 init_waitqueue_entry(&waiter, current);
936 add_wait_queue(&lock->cll_wq, &waiter); 936 add_wait_queue(&lock->cll_wq, &waiter);
937 set_current_state(TASK_INTERRUPTIBLE); 937 set_current_state(TASK_INTERRUPTIBLE);
938 cl_lock_mutex_put(env, lock); 938 cl_lock_mutex_put(env, lock);
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 8800384c061c..55bd47f4acb0 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -571,7 +571,7 @@ static struct lu_object *htable_lookup(struct lu_site *s,
571 * drained), and moreover, lookup has to wait until object is freed. 571 * drained), and moreover, lookup has to wait until object is freed.
572 */ 572 */
573 573
574 init_waitqueue_entry_current(waiter); 574 init_waitqueue_entry(waiter, current);
575 add_wait_queue(&bkt->lsb_marche_funebre, waiter); 575 add_wait_queue(&bkt->lsb_marche_funebre, waiter);
576 set_current_state(TASK_UNINTERRUPTIBLE); 576 set_current_state(TASK_UNINTERRUPTIBLE);
577 lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_DEATH_RACE); 577 lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_DEATH_RACE);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c
index f0aba500764e..359c48ec2f5b 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c
@@ -880,7 +880,7 @@ int gss_svc_upcall_handle_init(struct ptlrpc_request *req,
880 880
881 cache_get(&rsip->h); /* take an extra ref */ 881 cache_get(&rsip->h); /* take an extra ref */
882 init_waitqueue_head(&rsip->waitq); 882 init_waitqueue_head(&rsip->waitq);
883 init_waitqueue_entry_current(&wait); 883 init_waitqueue_entry(&wait, current);
884 add_wait_queue(&rsip->waitq, &wait); 884 add_wait_queue(&rsip->waitq, &wait);
885 885
886cache_check: 886cache_check:
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
index f65955d40d92..5e747e37f10c 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
@@ -545,7 +545,7 @@ again:
545 page_pools.epp_waitqlen; 545 page_pools.epp_waitqlen;
546 546
547 set_current_state(TASK_UNINTERRUPTIBLE); 547 set_current_state(TASK_UNINTERRUPTIBLE);
548 init_waitqueue_entry_current(&waitlink); 548 init_waitqueue_entry(&waitlink, current);
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);