struct obd_uuid *uuid)
{
struct obd_device *lov_obd = obd->u.mds.mds_osc_obd;
+ struct llog_ctxt *ctxt;
int rc;
ENTRY;
rc = llog_setup(obd, &obd->obd_olg, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL,
&mds_size_repl_logops);
if (rc)
- RETURN(rc);
+ GOTO(err_llog, rc);
rc = obd_llog_init(lov_obd, &lov_obd->obd_olg, tgt, count, logid, uuid);
- if (rc)
+ if (rc) {
CERROR("lov_llog_init err %d\n", rc);
+ GOTO(err_cleanup, rc);
+ }
RETURN(rc);
+err_cleanup:
+ ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
+err_llog:
+ ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
+ return rc;
}
int mds_llog_finish(struct obd_device *obd, int count)