X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flov%2Flov_log.c;h=7a5923e084a0b0626566c298c871f1eca1c227a6;hp=1c47d999162c27364c1cac33398a4157173fb2a5;hb=b0f15edd90807569acdc50bb973a0e80c87ea78e;hpb=362ae805e810f973f2f2b0712148cdb2aa964624 diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c index 1c47d99..7a5923e 100644 --- a/lustre/lov/lov_log.c +++ b/lustre/lov/lov_log.c @@ -218,7 +218,7 @@ int lov_llog_init(struct obd_device *obd, struct obd_llog_group *olg, rc = llog_setup(obd, olg, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL, &lov_size_repl_logops); if (rc) - RETURN(rc); + GOTO(err_cleanup, rc); lov_getref(obd); /* count may not match lov->desc.ld_tgt_count during dynamic ost add */ @@ -238,7 +238,18 @@ int lov_llog_init(struct obd_device *obd, struct obd_llog_group *olg, break; } lov_putref(obd); - RETURN(rc); + GOTO(err_cleanup, rc); +err_cleanup: + if (rc) { + struct llog_ctxt *ctxt = + llog_get_context(obd, LLOG_SIZE_REPL_CTXT); + if (ctxt) + llog_cleanup(ctxt); + ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); + if (ctxt) + llog_cleanup(ctxt); + } + return rc; } int lov_llog_finish(struct obd_device *obd, int count)