diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 51037c9f8fd32578c5e9aca2d5f3c10c380bfda4..72f81eea4e080e2a0e58f14ef4dfca4b06d8cefb 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1402,9 +1402,10 @@ int target_start_recovery_thread(struct obd_device *obd, svc_handler_t handler) init_completion(&trd->trd_finishing); trd->trd_recovery_handler = handler; - if (kernel_thread(target_recovery_thread, obd, 0) > 0) + if (kernel_thread(target_recovery_thread, obd, 0) > 0) { wait_for_completion(&trd->trd_starting); - else + LASSERT(obd->obd_recovering != 0); + } else rc = -ECHILD; return rc;