Whamcloud - gitweb
LU-8297 obd: release MGC device if connect fails
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 6b1ae94..3908e1e 100644 (file)
@@ -398,6 +398,9 @@ int lustre_start_mgc(struct super_block *sb)
 
         /* Random uuid for MGC allows easier reconnects */
         OBD_ALLOC_PTR(uuid);
+       if (uuid == NULL)
+               GOTO(out_free, rc = -ENOMEM);
+
         ll_generate_random_uuid(uuidc);
         class_uuid_unparse(uuidc, uuid);
 
@@ -1418,7 +1421,7 @@ static int lustre_fill_super(struct super_block *sb, void *data, int silent)
                } else {
                        rc = lustre_start_mgc(sb);
                        if (rc) {
-                               lustre_put_lsi(sb);
+                               lustre_common_put_super(sb);
                                GOTO(out, rc);
                        }
                        /* Connect and start */