Whamcloud - gitweb
when kernel_thread fails, print the return code instead of 0 (or nothing)
authorphil <phil>
Thu, 4 Dec 2003 02:56:32 +0000 (02:56 +0000)
committerphil <phil>
Thu, 4 Dec 2003 02:56:32 +0000 (02:56 +0000)
lnet/libcfs/debug.c
lustre/ldlm/ldlm_lockd.c
lustre/portals/libcfs/debug.c

index ad2c966..8449511 100644 (file)
@@ -423,7 +423,8 @@ void portals_debug_dumplog(void)
         rc = kernel_thread(portals_do_debug_dumplog,
                            NULL, CLONE_VM | CLONE_FS | CLONE_FILES);
         if (rc < 0) {
-                printk(KERN_ERR "LustreError: cannot start dump thread\n");
+                printk(KERN_ERR "LustreError: cannot start log dump thread: "
+                       "%d\n", rc);
                 return;
         }
         sleep_on(&debug_ctlwq);
index 5ee9f0f..30a0b1f 100644 (file)
@@ -1147,7 +1147,8 @@ static int ldlm_setup(void)
                         .bltd_blp = blp,
                 };
                 init_completion(&blp->blp_comp);
-                if (kernel_thread(ldlm_bl_thread_main, &bltd, 0) < 0) {
+                rc = kernel_thread(ldlm_bl_thread_main, &bltd, 0);
+                if (rc < 0) {
                         CERROR("cannot start LDLM thread #%d: rc %d\n", i, rc);
                         LBUG();
                         GOTO(out_thread, rc);
index ad2c966..8449511 100644 (file)
@@ -423,7 +423,8 @@ void portals_debug_dumplog(void)
         rc = kernel_thread(portals_do_debug_dumplog,
                            NULL, CLONE_VM | CLONE_FS | CLONE_FILES);
         if (rc < 0) {
-                printk(KERN_ERR "LustreError: cannot start dump thread\n");
+                printk(KERN_ERR "LustreError: cannot start log dump thread: "
+                       "%d\n", rc);
                 return;
         }
         sleep_on(&debug_ctlwq);