void *data, __u32 flags)
{
struct ptlrpc_thread *thread = &scrub->os_thread;
- struct l_wait_info lwi = { 0 };
struct task_struct *task;
int rc;
ENTRY;
if (unlikely(thread_is_stopping(thread))) {
spin_unlock(&scrub->os_lock);
- l_wait_event(thread->t_ctl_waitq,
- thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_stopped(thread));
goto again;
}
spin_unlock(&scrub->os_lock);
RETURN(rc);
}
- l_wait_event(thread->t_ctl_waitq,
- thread_is_running(thread) || thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_running(thread) || thread_is_stopped(thread));
RETURN(0);
}
void scrub_stop(struct lustre_scrub *scrub)
{
struct ptlrpc_thread *thread = &scrub->os_thread;
- struct l_wait_info lwi = { 0 };
/* os_lock: sync status between stop and scrub thread */
spin_lock(&scrub->os_lock);
thread_set_flags(thread, SVC_STOPPING);
spin_unlock(&scrub->os_lock);
wake_up_all(&thread->t_ctl_waitq);
- l_wait_event(thread->t_ctl_waitq,
- thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_stopped(thread));
/* Do not skip the last lock/unlock, which can guarantee that
* the caller cannot return until the OI scrub thread exit. */
spin_lock(&scrub->os_lock);