struct ptlrpc_thread *mthread = &lfsck->li_thread;
struct ptlrpc_thread *athread = &llmd->llmd_thread;
struct lfsck_thread_args *lta;
- long rc;
+ struct task_struct *task;
+ int rc;
ENTRY;
rc = lfsck_layout_prep(env, com, lsp->lsp_start);
if (IS_ERR(lta))
RETURN(PTR_ERR(lta));
- rc = PTR_ERR(kthread_run(lfsck_layout_assistant, lta, "lfsck_layout"));
- if (IS_ERR_VALUE(rc)) {
+ task = kthread_run(lfsck_layout_assistant, lta, "lfsck_layout");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
CERROR("%s: Cannot start LFSCK layout assistant thread: "
- "rc = %ld\n", lfsck_lfsck2name(lfsck), rc);
+ "rc = %d\n", lfsck_lfsck2name(lfsck), rc);
lfsck_thread_args_fini(lta);
} else {
struct l_wait_info lwi = { 0 };
struct lfsck_component *com;
struct l_wait_info lwi = { 0 };
struct lfsck_thread_args *lta;
- long rc = 0;
+ struct task_struct *task;
+ int rc = 0;
__u16 valid = 0;
__u16 flags = 0;
__u16 type = 1;
GOTO(out, rc = PTR_ERR(lta));
__lfsck_set_speed(lfsck, bk->lb_speed_limit);
- rc = PTR_ERR(kthread_run(lfsck_master_engine, lta, "lfsck"));
- if (IS_ERR_VALUE(rc)) {
- CERROR("%s: cannot start LFSCK thread: rc = %ld\n",
+ task = kthread_run(lfsck_master_engine, lta, "lfsck");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
+ CERROR("%s: cannot start LFSCK thread: rc = %d\n",
lfsck_lfsck2name(lfsck), rc);
lfsck_thread_args_fini(lta);
struct lfsck_instance *lfsck = com->lc_lfsck;
struct lfsck_namespace *ns = com->lc_file_ram;
struct lfsck_thread_args *lta;
- long rc;
+ struct task_struct *task;
+ int rc;
ENTRY;
if (unlikely(ns->ln_status != LS_SCANNING_PHASE2))
RETURN(PTR_ERR(lta));
atomic_inc(&lfsck->li_double_scan_count);
- rc = PTR_ERR(kthread_run(lfsck_namespace_double_scan_main, lta,
- "lfsck_namespace"));
- if (IS_ERR_VALUE(rc)) {
- CERROR("%s: cannot start LFSCK namespace thread: rc = %ld\n",
+ task = kthread_run(lfsck_namespace_double_scan_main, lta,
+ "lfsck_namespace");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
+ CERROR("%s: cannot start LFSCK namespace thread: rc = %d\n",
lfsck_lfsck2name(lfsck), rc);
atomic_dec(&lfsck->li_double_scan_count);
lfsck_thread_args_fini(lta);
{
struct ptlrpc_thread *thread = &ofd->ofd_inconsistency_thread;
struct l_wait_info lwi = { 0 };
- long rc;
+ struct task_struct *task;
+ int rc;
spin_lock(&ofd->ofd_inconsistency_lock);
if (unlikely(thread_is_running(thread))) {
thread_set_flags(thread, 0);
spin_unlock(&ofd->ofd_inconsistency_lock);
- rc = PTR_ERR(kthread_run(ofd_inconsistency_verification_main, ofd,
- "inconsistency_verification"));
- if (IS_ERR_VALUE(rc)) {
- CERROR("%s: cannot start self_repair thread: rc = %ld\n",
+ task = kthread_run(ofd_inconsistency_verification_main, ofd,
+ "inconsistency_verification");
+ if (IS_ERR(task)) {
+ rc = PTR_ERR(task);
+ CERROR("%s: cannot start self_repair thread: rc = %d\n",
ofd_obd(ofd)->obd_name, rc);
} else {
rc = 0;