Whamcloud - gitweb
LU-3498 kernel: remove uses of IS_ERR_VALUE()
[fs/lustre-release.git] / lustre / osp / osp_sync.c
index 298626d..07e3a41 100644 (file)
@@ -1106,6 +1106,7 @@ static void osp_sync_llog_fini(const struct lu_env *env, struct osp_device *d)
 int osp_sync_init(const struct lu_env *env, struct osp_device *d)
 {
        struct l_wait_info       lwi = { 0 };
+       struct task_struct      *task;
        int                      rc;
 
        ENTRY;
@@ -1134,10 +1135,11 @@ int osp_sync_init(const struct lu_env *env, struct osp_device *d)
        init_waitqueue_head(&d->opd_syn_thread.t_ctl_waitq);
        CFS_INIT_LIST_HEAD(&d->opd_syn_committed_there);
 
-       rc = PTR_ERR(kthread_run(osp_sync_thread, d,
-                                "osp-syn-%u-%u", d->opd_index, d->opd_group));
-       if (IS_ERR_VALUE(rc)) {
-               CERROR("%s: can't start sync thread: rc = %d\n",
+       task = kthread_run(osp_sync_thread, d, "osp-syn-%u-%u",
+                          d->opd_index, d->opd_group);
+       if (IS_ERR(task)) {
+               rc = PTR_ERR(task);
+               CERROR("%s: cannot start sync thread: rc = %d\n",
                       d->opd_obd->obd_name, rc);
                GOTO(err_llog, rc);
        }