staging/lustre/libcfs: remove waitq_wait
authorPeng Tao <bergwolf@gmail.com>
Tue, 18 Mar 2014 13:05:53 +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>
12 files changed:
drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_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/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/sec_bulk.c

index b17456724fa7a2980146b82cadd75af879089c68..b9251a59bba1397d3ecfcfd39398976922980fde 100644 (file)
@@ -52,7 +52,6 @@ typedef  void (cfs_timer_func_t)(ulong_ptr_t);
 void schedule_timeout_and_set_state(long, int64_t);
 
 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 *);
 
 void cfs_init_timer(struct timer_list *t);
index 9ae5745b6947755e4446fc7d69e29745caf3be3f..07b1da248c0414cc2992acc4ef83cf81286ae887 100644 (file)
@@ -3423,7 +3423,7 @@ kiblnd_scheduler(void *arg)
                add_wait_queue_exclusive(&sched->ibs_waitq, &wait);
                spin_unlock_irqrestore(&sched->ibs_lock, flags);
 
-               waitq_wait(&wait, TASK_INTERRUPTIBLE);
+               schedule();
                busy_loops = 0;
 
                remove_wait_queue(&sched->ibs_waitq, &wait);
index 6209728aceae57d21d200f3145338bbcbc7b7646..65af2018317e08d165900d7337d923112f17cfe3 100644 (file)
@@ -341,7 +341,7 @@ lnet_eq_wait_locked(int *timeout_ms)
        lnet_eq_wait_unlock();
 
        if (tms < 0) {
-               waitq_wait(&wl, TASK_INTERRUPTIBLE);
+               schedule();
 
        } else {
                struct timeval tv;
index 0521a06e5c96d9fb6ee9d196530ec353e7f0318c..3401c9ad42ac71c8ae0be4890c90c4ef55221253 100644 (file)
@@ -225,7 +225,7 @@ static int seq_fid_alloc_prep(struct lu_client_seq *seq,
                set_current_state(TASK_UNINTERRUPTIBLE);
                mutex_unlock(&seq->lcs_mutex);
 
-               waitq_wait(link, TASK_UNINTERRUPTIBLE);
+               schedule();
 
                mutex_lock(&seq->lcs_mutex);
                remove_wait_queue(&seq->lcs_waitq, link);
@@ -378,7 +378,7 @@ void seq_client_flush(struct lu_client_seq *seq)
                set_current_state(TASK_UNINTERRUPTIBLE);
                mutex_unlock(&seq->lcs_mutex);
 
-               waitq_wait(&link, TASK_UNINTERRUPTIBLE);
+               schedule();
 
                mutex_lock(&seq->lcs_mutex);
                remove_wait_queue(&seq->lcs_waitq, &link);
index 62111850c6ac803a741c5a11daa61c9c6d4256d9..06954364db5eab837e4322590ba7403905330a9e 100644 (file)
@@ -558,7 +558,7 @@ do {                                                                           \
                        break;                                           \
                                                                               \
                if (__timeout == 0) {                                     \
-                       waitq_wait(&__wait, __wstate);               \
+                       schedule();                                             \
                } else {                                                       \
                        cfs_duration_t interval = info->lwi_interval?     \
                                             min_t(cfs_duration_t,           \
index a1902f122a7539e49c2e73547e0ab5f47055a94b..6907a16dbbd1dc39ca9e10445978eb8560348088 100644 (file)
@@ -1203,7 +1203,7 @@ static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (atomic_read(&header->loh_ref) == 1)
                                break;
-                       waitq_wait(&waiter, TASK_UNINTERRUPTIBLE);
+                       schedule();
                }
 
                set_current_state(TASK_RUNNING);
index b65e12a69cadcde7b611e531c3391356dfa182da..1e4c5ad26157793542271601ba642a2e582a80e4 100644 (file)
@@ -379,7 +379,7 @@ void libcfs_debug_dumplog(void)
                printk(KERN_ERR "LustreError: cannot start log dump thread:"
                       " %ld\n", PTR_ERR(dumper));
        else
-               waitq_wait(&wait, TASK_INTERRUPTIBLE);
+               schedule();
 
        /* be sure to teardown if cfs_create_thread() failed */
        remove_wait_queue(&debug_ctlwq, &wait);
index 548cb1b6325bc36573e545e2e7e110fc4a54b251..86475c2b42a72fb991f93bd9c402b2c83cd7a696 100644 (file)
@@ -70,13 +70,6 @@ add_wait_queue_exclusive_head(wait_queue_head_t *waitq, wait_queue_t *link)
 }
 EXPORT_SYMBOL(add_wait_queue_exclusive_head);
 
-void
-waitq_wait(wait_queue_t *link, long state)
-{
-       schedule();
-}
-EXPORT_SYMBOL(waitq_wait);
-
 int64_t
 waitq_timedwait(wait_queue_t *link, long state, int64_t timeout)
 {
index 8a7a55e771ad4b1cdd74b3fd4091434801415b72..d6b2cb45b938fb01b7d91158adbe9f27adb29f84 100644 (file)
@@ -320,7 +320,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
                        spin_lock(&r0->lo_sub_lock);
                        if (r0->lo_sub[idx] == los) {
                                spin_unlock(&r0->lo_sub_lock);
-                               waitq_wait(waiter, TASK_UNINTERRUPTIBLE);
+                               schedule();
                        } else {
                                spin_unlock(&r0->lo_sub_lock);
                                set_current_state(TASK_RUNNING);
index c6e1df3fdc2cbc1d625bb8457656041397710dd3..d795cef3f16452658eb6408644f1952b0010149b 100644 (file)
@@ -943,7 +943,7 @@ int cl_lock_state_wait(const struct lu_env *env, struct cl_lock *lock)
                 * can be restarted if signals are pending here */
                result = -ERESTARTSYS;
                if (likely(!OBD_FAIL_CHECK(OBD_FAIL_LOCK_STATE_WAIT_INTR))) {
-                       waitq_wait(&waiter, TASK_INTERRUPTIBLE);
+                       schedule();
                        if (!cfs_signal_pending())
                                result = 0;
                }
index 55bd47f4acb0e878afd82faa450d19c20afcef41..92e8a15a5e5d77bc068a1a312274109c642784eb 100644 (file)
@@ -712,7 +712,7 @@ struct lu_object *lu_object_find_at(const struct lu_env *env,
                 * lu_object_find_try() already added waiter into the
                 * wait queue.
                 */
-               waitq_wait(&wait, TASK_UNINTERRUPTIBLE);
+               schedule();
                bkt = lu_site_bkt_from_fid(dev->ld_site, (void *)f);
                remove_wait_queue(&bkt->lsb_marche_funebre, &wait);
        }
index 5e747e37f10cdc67a30afa28fc709ef4da95e529..9656681327478657530642ef6ecd37c83228ad23 100644 (file)
@@ -549,7 +549,7 @@ again:
                        add_wait_queue(&page_pools.epp_waitq, &waitlink);
 
                        spin_unlock(&page_pools.epp_lock);
-                       waitq_wait(&waitlink, TASK_UNINTERRUPTIBLE);
+                       schedule();
                        remove_wait_queue(&page_pools.epp_waitq, &waitlink);
                        LASSERT(page_pools.epp_waitqlen > 0);
                        spin_lock(&page_pools.epp_lock);