mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9e795d3581
commit
b3669a7f54
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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, \
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user