From 8e387d33e24971c7025b6adb1d7f99f557c45227 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 4 Dec 2003 02:56:32 +0000 Subject: [PATCH] when kernel_thread fails, print the return code instead of 0 (or nothing) --- lnet/libcfs/debug.c | 3 ++- lustre/ldlm/ldlm_lockd.c | 3 ++- lustre/portals/libcfs/debug.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index ad2c966..8449511 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -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); diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 5ee9f0f..30a0b1f 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -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); diff --git a/lustre/portals/libcfs/debug.c b/lustre/portals/libcfs/debug.c index ad2c966..8449511 100644 --- a/lustre/portals/libcfs/debug.c +++ b/lustre/portals/libcfs/debug.c @@ -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); -- 1.8.3.1