RETURN(rc);
}
- rc = lwp_setup(env, lwp, lustre_cfg_string(cfg, 1));
+ rc = lprocfs_obd_setup(lwp->lpd_obd, true);
if (rc) {
- CERROR("%s: setup lwp failed. %d\n",
+ CERROR("%s: lprocfs_obd_setup failed. %d\n",
lwp->lpd_obd->obd_name, rc);
ptlrpcd_decref();
RETURN(rc);
}
- rc = lprocfs_obd_setup(lwp->lpd_obd, true);
+ rc = lwp_setup(env, lwp, lustre_cfg_string(cfg, 1));
if (rc) {
- CERROR("%s: lprocfs_obd_setup failed. %d\n",
+ CERROR("%s: setup lwp failed. %d\n",
lwp->lpd_obd->obd_name, rc);
+ lprocfs_obd_cleanup(lwp->lpd_obd);
ptlrpcd_decref();
RETURN(rc);
}
{
struct lwp_device *m = lu2lwp_dev(ludev);
struct ptlrpc_thread *thread = &m->lpd_notify_thread;
- struct l_wait_info lwi = { 0 };
int rc;
ENTRY;
- if (!thread_is_stopped(thread))
- l_wait_event(thread->t_ctl_waitq, thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq, thread_is_stopped(thread));
if (m->lpd_exp != NULL)
class_disconnect(m->lpd_exp);
LASSERT(m->lpd_obd);
- ptlrpc_lprocfs_unregister_obd(m->lpd_obd);
-
rc = client_obd_cleanup(m->lpd_obd);
LASSERTF(rc == 0, "error %d\n", rc);
+ ptlrpc_lprocfs_unregister_obd(m->lpd_obd);
+
ptlrpcd_decref();
RETURN(NULL);
struct lwp_device *lwp;
struct ptlrpc_thread *thread;
struct task_struct *task;
- struct l_wait_info lwi = { 0 };
char name[MTI_NAME_MAXLEN];
LASSERT(exp != NULL);
name, PTR_ERR(task));
}
- 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));
}
/**