Whamcloud - gitweb
*** empty log message ***
authorshadow <shadow>
Wed, 8 Apr 2009 08:31:44 +0000 (08:31 +0000)
committershadow <shadow>
Wed, 8 Apr 2009 08:31:44 +0000 (08:31 +0000)
lustre/ldlm/ldlm_lib.c

index 9544e3d..79db4b2 100644 (file)
@@ -386,14 +386,15 @@ int client_connect_import(struct lustre_handle *dlm_handle,
         ENTRY;
 
         down_write(&cli->cl_sem);
-        rc = class_connect(dlm_handle, obd, cluuid);
-        if (rc)
-                GOTO(out_sem, rc);
-
         if (cli->cl_conn_count > 0)
                 GOTO(out_sem, rc = -EALREADY);
                 
         cli->cl_conn_count++;
+
+        rc = class_connect(dlm_handle, obd, cluuid);
+        if (rc)
+                GOTO(out_sem, rc);
+
         *exp = class_conn2export(dlm_handle);
 
         if (obd->obd_namespace != NULL)