static int ldlm_setup(void)
{
static struct ptlrpc_service_conf conf;
- struct ldlm_bl_pool *blp = NULL;
- int rc = 0;
+ struct ldlm_bl_pool *blp = NULL;
#ifdef __KERNEL__
- int i;
+# ifdef HAVE_SERVER_SUPPORT
+ struct task_struct *task;
+# endif
+ int i;
#endif
+ int rc = 0;
+
ENTRY;
if (ldlm_state != NULL)
spin_lock_init(&waiting_locks_spinlock);
cfs_timer_init(&waiting_locks_timer, waiting_locks_callback, 0);
- rc = PTR_ERR(kthread_run(expired_lock_main, NULL, "ldlm_elt"));
- if (IS_ERR_VALUE(rc)) {
+ task = kthread_run(expired_lock_main, NULL, "ldlm_elt");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
CERROR("Cannot start ldlm expired-lock thread: %d\n", rc);
GOTO(out, rc);
}