Whamcloud - gitweb
LU-3963 libcfs: convert llite/lmv/lod/lov cfs_atomic primitive
[fs/lustre-release.git] / lustre / lfsck / lfsck_namespace.c
index 36089aa..c80fb48 100644 (file)
@@ -752,7 +752,8 @@ static int lfsck_namespace_checkpoint(const struct lu_env *env,
 }
 
 static int lfsck_namespace_prep(const struct lu_env *env,
-                               struct lfsck_component *com)
+                               struct lfsck_component *com,
+                               struct lfsck_start_param *lsp)
 {
        struct lfsck_instance   *lfsck  = com->lc_lfsck;
        struct lfsck_namespace  *ns     = com->lc_file_ram;
@@ -1482,7 +1483,6 @@ fini:
 
 out:
        down_write(&com->lc_sem);
-
        ns->ln_run_time_phase2 += cfs_duration_sec(cfs_time_current() +
                                HALF_SEC - lfsck->li_time_last_checkpoint);
        ns->ln_time_last_checkpoint = cfs_time_current_sec();
@@ -1504,15 +1504,7 @@ out:
                ns->ln_status = LS_FAILED;
        }
 
-       if (ns->ln_status != LS_PAUSED) {
-               spin_lock(&lfsck->li_lock);
-               cfs_list_del_init(&com->lc_link);
-               cfs_list_add_tail(&com->lc_link, &lfsck->li_list_idle);
-               spin_unlock(&lfsck->li_lock);
-       }
-
        rc = lfsck_namespace_store(env, com, false);
-
        up_write(&com->lc_sem);
        if (atomic_dec_and_test(&lfsck->li_double_scan_count))
                wake_up_all(&thread->t_ctl_waitq);
@@ -1534,7 +1526,7 @@ static int lfsck_namespace_double_scan(const struct lu_env *env,
        if (unlikely(ns->ln_status != LS_SCANNING_PHASE2))
                RETURN(0);
 
-       lta = lfsck_thread_args_init(lfsck, com);
+       lta = lfsck_thread_args_init(lfsck, com, NULL);
        if (IS_ERR(lta))
                RETURN(PTR_ERR(lta));