staging/lustre/libcfs: remove init_waitqueue_entry_current
authorPeng Tao <bergwolf@gmail.com>
Tue, 18 Mar 2014 13:05:52 +0000 (21:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Mar 2014 20:42:38 +0000 (13:42 -0700)
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>
16 files changed:
drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/lnet/lib-eq.c
drivers/staging/lustre/lustre/fid/fid_request.c
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/lclient/lcommon_cl.c
drivers/staging/lustre/lustre/libcfs/debug.c
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/libcfs/upcall_cache.c
drivers/staging/lustre/lustre/lov/lov_object.c
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/lu_object.c
drivers/staging/lustre/lustre/ptlrpc/gss/gss_svc_upcall.c
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c

index e6e417aeefd5b1859828f9f5f25be6eb8074c1f5..b17456724fa7a2980146b82cadd75af879089c68 100644 (file)
@@ -51,7 +51,6 @@ void cfs_pause(cfs_duration_t ticks);
 typedef  void (cfs_timer_func_t)(ulong_ptr_t);
 void schedule_timeout_and_set_state(long, int64_t);
 
-void init_waitqueue_entry_current(wait_queue_t *link);
 int64_t waitq_timedwait(wait_queue_t *, long, int64_t);
 void waitq_wait(wait_queue_t *, long);
 void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);
index 6f58ead2039343d1257381d5dcf05faff433044c..9ae5745b6947755e4446fc7d69e29745caf3be3f 100644 (file)
@@ -3127,7 +3127,7 @@ kiblnd_connd (void *arg)
 
        cfs_block_allsigs ();
 
-       init_waitqueue_entry_current (&wait);
+       init_waitqueue_entry(&wait, current);
        kiblnd_data.kib_connd = current;
 
        spin_lock_irqsave(&kiblnd_data.kib_connd_lock, flags);
@@ -3324,7 +3324,7 @@ kiblnd_scheduler(void *arg)
 
        cfs_block_allsigs();
 
-       init_waitqueue_entry_current(&wait);
+       init_waitqueue_entry(&wait, current);
 
        sched = kiblnd_data.kib_scheds[KIB_THREAD_CPT(id)];
 
@@ -3450,7 +3450,7 @@ kiblnd_failover_thread(void *arg)
 
        cfs_block_allsigs ();
 
-       init_waitqueue_entry_current(&wait);
+       init_waitqueue_entry(&wait, current);
        write_lock_irqsave(glock, flags);
 
        while (!kiblnd_data.kib_shutdown) {
index b7b53b579c8524abf460898212264b716ba0aac2..fdf9101fea467a5891b2269429f2cdc88f5d8506 100644 (file)
@@ -2140,7 +2140,7 @@ ksocknal_connd (void *arg)
 
        cfs_block_allsigs ();
 
-       init_waitqueue_entry_current (&wait);
+       init_waitqueue_entry(&wait, current);
 
        spin_lock_bh(connd_lock);
 
@@ -2532,7 +2532,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);
 
index 4ce68d3b09311d8088665314c0a678f31b50ca54..6209728aceae57d21d200f3145338bbcbc7b7646 100644 (file)
@@ -334,7 +334,7 @@ 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);
 
index 69e6a325a9eadea75c03485559b333a93ad71a5d..0521a06e5c96d9fb6ee9d196530ec353e7f0318c 100644 (file)
@@ -256,7 +256,7 @@ int seq_client_get_seq(const struct lu_env *env,
 
        LASSERT(seqnr != NULL);
        mutex_lock(&seq->lcs_mutex);
-       init_waitqueue_entry_current(&link);
+       init_waitqueue_entry(&link, current);
 
        while (1) {
                rc = seq_fid_alloc_prep(seq, &link);
@@ -306,7 +306,7 @@ int seq_client_alloc_fid(const struct lu_env *env,
        LASSERT(seq != NULL);
        LASSERT(fid != NULL);
 
-       init_waitqueue_entry_current(&link);
+       init_waitqueue_entry(&link, current);
        mutex_lock(&seq->lcs_mutex);
 
        if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST))
@@ -370,7 +370,7 @@ void seq_client_flush(struct lu_client_seq *seq)
        wait_queue_t link;
 
        LASSERT(seq != NULL);
-       init_waitqueue_entry_current(&link);
+       init_waitqueue_entry(&link, current);
        mutex_lock(&seq->lcs_mutex);
 
        while (seq->lcs_update) {
index 609a090484a65a9e9d0b39b90dd598111316e993..62111850c6ac803a741c5a11daa61c9c6d4256d9 100644 (file)
@@ -536,7 +536,7 @@ do {                                                                           \
        if (condition)                                                   \
                break;                                                   \
                                                                               \
-       init_waitqueue_entry_current(&__wait);                                      \
+       init_waitqueue_entry(&__wait, current);                                     \
        l_add_wait(&wq, &__wait);                                             \
                                                                               \
        /* Block all signals (just the non-fatal ones if no timeout). */       \
index 94b164127e0cb2ad82e0cf8987c56f07cfbc3389..a1902f122a7539e49c2e73547e0ab5f47055a94b 100644 (file)
@@ -1196,7 +1196,7 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
 
                bkt = lu_site_bkt_from_fid(site, &header->loh_fid);
 
-               init_waitqueue_entry_current(&waiter);
+               init_waitqueue_entry(&waiter, current);
                add_wait_queue(&bkt->lsb_marche_funebre, &waiter);
 
                while (1) {
index f30c84f195aa12b9ff1a5e84c6dbc44e96716bad..b65e12a69cadcde7b611e531c3391356dfa182da 100644 (file)
@@ -368,7 +368,7 @@ void libcfs_debug_dumplog(void)
        /* we're being careful to ensure that the kernel thread is
         * able to set our state to running as it exits before we
         * get to schedule() */
-       init_waitqueue_entry_current(&wait);
+       init_waitqueue_entry(&wait, current);
        set_current_state(TASK_INTERRUPTIBLE);
        add_wait_queue(&debug_ctlwq, &wait);
 
index c7bc7fcccb8ede9550ca8f36373a8d99a5d176c8..548cb1b6325bc36573e545e2e7e110fc4a54b251 100644 (file)
 #include <asm/kgdb.h>
 #endif
 
-void
-init_waitqueue_entry_current(wait_queue_t *link)
-{
-       init_waitqueue_entry(link, current);
-}
-EXPORT_SYMBOL(init_waitqueue_entry_current);
-
 /**
  * wait_queue_t of Linux (version < 2.6.34) is a FIFO list for exclusively
  * waiting threads, which is not always desirable because all threads will
index 54290ce6bb438c2257eea9abcdd60410b410651e..32ed879e66d446f85b80e6e286e622c657231c09 100644 (file)
@@ -1076,7 +1076,7 @@ end_loop:
                                break;
                        }
                }
-               init_waitqueue_entry_current(&__wait);
+               init_waitqueue_entry(&__wait, current);
                add_wait_queue(&tctl->tctl_waitq, &__wait);
                set_current_state(TASK_INTERRUPTIBLE);
                waitq_timedwait(&__wait, TASK_INTERRUPTIBLE,
index 245b46f0dd960745d9cdfea2023b357000378c10..8a3b62d08e682ca66050bc8c4b09989abb25855f 100644 (file)
@@ -218,7 +218,7 @@ find_again:
                              MAX_SCHEDULE_TIMEOUT;
                long left;
 
-               init_waitqueue_entry_current(&wait);
+               init_waitqueue_entry(&wait, current);
                add_wait_queue(&entry->ue_waitq, &wait);
                set_current_state(TASK_INTERRUPTIBLE);
                spin_unlock(&cache->uc_lock);
index 7a85cafecf1b570f0514fdf266ff7b060cca984c..8a7a55e771ad4b1cdd74b3fd4091434801415b72 100644 (file)
@@ -310,7 +310,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
         * ->lo_sub[] slot in lovsub_object_fini() */
        if (r0->lo_sub[idx] == los) {
                waiter = &lov_env_info(env)->lti_waiter;
-               init_waitqueue_entry_current(waiter);
+               init_waitqueue_entry(waiter, current);
                add_wait_queue(&bkt->lsb_marche_funebre, waiter);
                set_current_state(TASK_UNINTERRUPTIBLE);
                while (1) {
index 749eb082f97975b64114a00b8a1946715e664d25..c6e1df3fdc2cbc1d625bb8457656041397710dd3 100644 (file)
@@ -932,7 +932,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
                 * LU-305 */
                blocked = cfs_block_sigsinv(LUSTRE_FATAL_SIGS);
 
-               init_waitqueue_entry_current(&waiter);
+               init_waitqueue_entry(&waiter, current);
                add_wait_queue(&lock->cll_wq, &waiter);
                set_current_state(TASK_INTERRUPTIBLE);
                cl_lock_mutex_put(env, lock);
index 8800384c061cc3ca9e0fae312caa30ebe7284778..55bd47f4acb0e878afd82faa450d19c20afcef41 100644 (file)
@@ -571,7 +571,7 @@ static struct lu_object *htable_lookup(struct lu_site *s,
         * drained), and moreover, lookup has to wait until object is freed.
         */
 
-       init_waitqueue_entry_current(waiter);
+       init_waitqueue_entry(waiter, current);
        add_wait_queue(&bkt->lsb_marche_funebre, waiter);
        set_current_state(TASK_UNINTERRUPTIBLE);
        lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_DEATH_RACE);
index f0aba500764ed1841129b73abfba373f1b350086..359c48ec2f5bf3de518e486dd9615a721c97c8a9 100644 (file)
@@ -880,7 +880,7 @@ int gss_svc_upcall_handle_init(struct ptlrpc_request *req,
 
        cache_get(&rsip->h); /* take an extra ref */
        init_waitqueue_head(&rsip->waitq);
-       init_waitqueue_entry_current(&wait);
+       init_waitqueue_entry(&wait, current);
        add_wait_queue(&rsip->waitq, &wait);
 
 cache_check:
index f65955d40d9229bda10e6834c1ac423e97786763..5e747e37f10cdc67a30afa28fc709ef4da95e529 100644 (file)
@@ -545,7 +545,7 @@ again:
                                                page_pools.epp_waitqlen;
 
                        set_current_state(TASK_UNINTERRUPTIBLE);
-                       init_waitqueue_entry_current(&waitlink);
+                       init_waitqueue_entry(&waitlink, current);
                        add_wait_queue(&page_pools.epp_waitq, &waitlink);
 
                        spin_unlock(&page_pools.epp_lock);