Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Fri, 3 Apr 2009 03:43:18 +0000 (03:43 +0000)
committerbobijam <bobijam>
Fri, 3 Apr 2009 03:43:18 +0000 (03:43 +0000)
b=18895
i=robert.read
i=tappro

when mds_setup() fails the error handle path needs clean possibly built
nid_stat which builds nid_proc on obd's obd_proc_exports_entry.

lustre/obdclass/lprocfs_status.c

index 239b00d..9e6768b 100644 (file)
@@ -1694,7 +1694,6 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid)
                                    lprocfs_exp_rd_hash, NULL, new_stat, NULL);
         if (IS_ERR(entry)) {
                 CWARN("Error adding the hash file\n");
-                lprocfs_remove(&new_stat->nid_proc);
                 rc = PTR_ERR(entry);
                 GOTO(destroy_new_ns, rc);
         }
@@ -1709,6 +1708,8 @@ int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t *nid, int *newnid)
         RETURN(rc);
 
 destroy_new_ns:
+        if (new_stat->nid_proc != NULL)
+                lprocfs_remove(&new_stat->nid_proc);
         lustre_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash);
         OBD_FREE_PTR(new_ns_uuid);