Whamcloud - gitweb
LU-572 ptlrpc: make ptlrpc_recover_import() async
[fs/lustre-release.git] / lustre / ptlrpc / pinger.c
index 821f55c..8251636 100644 (file)
@@ -363,7 +363,7 @@ int ptlrpc_start_pinger(void)
 
         /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
          * just drop the VM and FILES in cfs_daemonize_ctxt() right away. */
-        rc = cfs_kernel_thread(ptlrpc_pinger_main, &d, CLONE_VM | CLONE_FILES);
+        rc = cfs_create_thread(ptlrpc_pinger_main, &d, CFS_DAEMON_FLAGS);
         if (rc < 0) {
                 CERROR("cannot start thread: %d\n", rc);
                 OBD_FREE(pinger_thread, sizeof(*pinger_thread));
@@ -599,7 +599,7 @@ int ping_evictor_wake(struct obd_export *exp)
 
         obd = class_exp2obd(exp);
         if (cfs_list_empty(&obd->obd_evict_list)) {
-                class_incref(obd, __FUNCTION__, cfs_current());
+                class_incref(obd, "evictor", obd);
                 cfs_list_add(&obd->obd_evict_list, &pet_list);
         }
         cfs_spin_unlock(&pet_lock);
@@ -682,7 +682,7 @@ static int ping_evictor_main(void *arg)
                 cfs_list_del_init(&obd->obd_evict_list);
                 cfs_spin_unlock(&pet_lock);
 
-                class_decref(obd, __FUNCTION__, cfs_current());
+                class_decref(obd, "evictor", obd);
         }
         CDEBUG(D_HA, "Exiting Ping Evictor\n");
 
@@ -698,7 +698,7 @@ void ping_evictor_start(void)
 
         cfs_waitq_init(&pet_waitq);
 
-        rc = cfs_kernel_thread(ping_evictor_main, NULL, CLONE_VM | CLONE_FILES);
+        rc = cfs_create_thread(ping_evictor_main, NULL, CFS_DAEMON_FLAGS);
         if (rc < 0) {
                 pet_refcount--;
                 CERROR("Cannot start ping evictor thread: %d\n", rc);