From: yury Date: Thu, 23 Oct 2008 11:00:27 +0000 (+0000) Subject: b=17447 X-Git-Tag: v1_7_130~1^145~1 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=34a30dfd7690c67012a17bee9d3956b7bbf5dcfc;p=fs%2Flustre-release.git b=17447 r=adilger,deen - fixes existing and possible memory leaks; - cleanups. --- diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c index c4373a1..22a9e29 100644 --- a/lustre/mgs/mgs_handler.c +++ b/lustre/mgs/mgs_handler.c @@ -163,6 +163,7 @@ static int mgs_setup(struct obd_device *obd, obd_count len, void *buf) struct mgs_obd *mgs = &obd->u.mgs; struct lustre_mount_info *lmi; struct lustre_sb_info *lsi; + struct llog_ctxt *ctxt; struct vfsmount *mnt; int rc = 0; ENTRY; @@ -223,7 +224,7 @@ static int mgs_setup(struct obd_device *obd, obd_count len, void *buf) if (!mgs->mgs_service) { CERROR("failed to start service\n"); - GOTO(err_fs, rc = -ENOMEM); + GOTO(err_llog, rc = -ENOMEM); } rc = ptlrpc_start_threads(obd, mgs->mgs_service); @@ -244,6 +245,10 @@ static int mgs_setup(struct obd_device *obd, obd_count len, void *buf) err_thread: ptlrpc_unregister_service(mgs->mgs_service); +err_llog: + ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT); + if (ctxt) + llog_cleanup(ctxt); err_fs: /* No extra cleanup needed for llog_init_commit_thread() */ mgs_fs_cleanup(obd);