From: nathan Date: Wed, 6 Apr 2005 01:43:19 +0000 (+0000) Subject: Branch b1_4 X-Git-Tag: v1_8_0_110~486^7~54 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=47657af34c4f2c82f2ad5924f1a1bea09ef9487a;p=fs%2Flustre-release.git Branch b1_4 b=5949 quickly undo broken stuff before anyone realizes it broke. --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 06832c2..bdb1e83 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -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) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 9ede6b2..56056a7 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -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);