- rq_state = 0;
- cfs_waitq_init(&rq_waitq);
-
- /* start requeue thread */
- rc = cfs_create_thread(mgc_requeue_thread, NULL,
- CFS_DAEMON_FLAGS);
- if (rc < 0) {
- CERROR("%s: Cannot start requeue thread (%d),"
- "no more log updates!\n",
- obd->obd_name, rc);
- GOTO(err_cleanup, rc);
- }
- /* rc is the pid of mgc_requeue_thread. */
- rc = 0;
+ rq_state = 0;
+ cfs_waitq_init(&rq_waitq);
+
+ /* start requeue thread */
+ rc = PTR_ERR(kthread_run(mgc_requeue_thread, NULL,
+ "ll_cfg_requeue"));
+ if (IS_ERR_VALUE(rc)) {
+ CERROR("%s: Cannot start requeue thread (%d),"
+ "no more log updates!\n",
+ obd->obd_name, rc);
+ GOTO(err_cleanup, rc);
+ }
+ /* rc is the task_struct pointer of mgc_requeue_thread. */
+ rc = 0;