Whamcloud - gitweb
- free mgs and fsname strings from lmd
authoralex <alex>
Thu, 26 Feb 2009 08:44:32 +0000 (08:44 +0000)
committeralex <alex>
Thu, 26 Feb 2009 08:44:32 +0000 (08:44 +0000)
 - release counter for failed osd

lustre/obdclass/obd_mount.c

index 2516be5..c188064 100644 (file)
@@ -1308,6 +1308,12 @@ static int lustre_free_lsi(struct super_block *sb)
                         OBD_FREE(lsi->lsi_lmd->lmd_exclude,
                                  sizeof(lsi->lsi_lmd->lmd_exclude[0]) *
                                  lsi->lsi_lmd->lmd_exclude_count);
+                if (lsi->lsi_lmd->lmd_mgs)
+                        OBD_FREE(lsi->lsi_lmd->lmd_mgs,
+                                        strlen(lsi->lsi_lmd->lmd_mgs) + 1);
+                if (lsi->lsi_lmd->lmd_fsname)
+                        OBD_FREE(lsi->lsi_lmd->lmd_fsname,
+                                        strlen(lsi->lsi_lmd->lmd_fsname) + 1);
                 OBD_FREE(lsi->lsi_lmd, sizeof(*lsi->lsi_lmd));
         }
 
@@ -1481,6 +1487,7 @@ out:
         if (rc) {
                 if (d) {
                         LASSERT(ldt);
+                        type->typ_refcnt--;
                         ldt->ldt_ops->ldto_device_fini(&env, d);
                         ldt->ldt_ops->ldto_device_free(&env, d);
                 }