Whamcloud - gitweb
Branch b1_4
authornathan <nathan>
Wed, 6 Apr 2005 01:43:19 +0000 (01:43 +0000)
committernathan <nathan>
Wed, 6 Apr 2005 01:43:19 +0000 (01:43 +0000)
b=5949
quickly undo broken stuff before anyone realizes it broke.

lustre/mds/handler.c
lustre/obdfilter/filter.c

index 06832c2..bdb1e83 100644 (file)
@@ -296,19 +296,16 @@ static int mds_connect(struct lustre_handle *conn, struct obd_device *obd,
         med->med_mcd = mcd;
 
         rc = mds_client_add(obd, &obd->u.mds, med, -1);
-
+        if (rc == 0)
+                EXIT;
 out:
         if (rc) {
-                if (mcd) {
-                        OBD_FREE(mcd, sizeof(*mcd));
-                        med->med_mcd = NULL;
-                }
+                OBD_FREE(mcd, sizeof(*mcd));
                 class_disconnect(exp);
-        } else {
-                class_export_put(exp);
         }
+        class_export_put(exp);
 
-        RETURN(rc);
+        return rc;
 }
 
 static int mds_init_export(struct obd_export *exp) 
index 9ede6b2..56056a7 100644 (file)
@@ -1467,16 +1467,13 @@ static int filter_connect(struct lustre_handle *conn, struct obd_device *obd,
 
 cleanup:
         if (rc) {
-                if (fcd) {
+                if (fcd)
                         OBD_FREE(fcd, sizeof(*fcd));
-                        fed->fed_fcd = NULL;
-                }
                 class_disconnect(exp);
         } else {
                 class_export_put(exp);
         }
-        
-        RETURN(rc);
+        return rc;
 }
 
 /* Do extra sanity checks for grant accounting.  We do this at connect,
@@ -1624,6 +1621,7 @@ static int filter_disconnect(struct obd_export *exp)
 
         /* Disconnect early so that clients can't keep using export */
         rc = class_disconnect(exp);
+
         ldlm_cancel_locks_for_export(exp);
 
         fsfilt_sync(obd, obd->u.filter.fo_sb);