From: jxiong Date: Wed, 4 Mar 2009 05:21:25 +0000 (+0000) Subject: b=18380 X-Git-Tag: v1_9_164~33 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=206ca53585f883634b712f27f8d059700604dacc b=18380 r=nathan,wangdi Fix a deadlock case for procfs. --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index b400a27..8687129 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -411,9 +411,15 @@ int client_connect_import(const struct lu_env *env, if (obd->obd_namespace != NULL) CERROR("already have namespace!\n"); + + /* + * Deadlock case - bug 18380 + */ + up_write(&cli->cl_sem); obd->obd_namespace = ldlm_namespace_new(obd, obd->obd_name, LDLM_NAMESPACE_CLIENT, LDLM_NAMESPACE_GREEDY); + down_write(&cli->cl_sem); if (obd->obd_namespace == NULL) GOTO(out_disco, rc = -ENOMEM);