From 7a97d943e84e9a2438eb8f1a7e32d325de6a98af Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 28 Mar 2005 23:05:35 +0000 Subject: [PATCH] try to clean up all lov/mds llogs, even if first on fails --- lustre/lov/lov_log.c | 8 ++++---- lustre/mds/mds_log.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c index 056d60d..f04c996 100644 --- a/lustre/lov/lov_log.c +++ b/lustre/lov/lov_log.c @@ -191,7 +191,7 @@ int lov_llog_init(struct obd_device *obd, struct obd_device *tgt, int lov_llog_finish(struct obd_device *obd, int count) { struct llog_ctxt *ctxt; - int rc = 0; + int rc = 0, rc2 = 0; ENTRY; /* cleanup our llogs only if the ctxts have been setup @@ -199,12 +199,12 @@ int lov_llog_finish(struct obd_device *obd, int count) ctxt = llog_get_context(obd, LLOG_UNLINK_ORIG_CTXT); if (ctxt) rc = llog_cleanup(ctxt); - if (rc) - RETURN(rc); ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); if (ctxt) - rc = llog_cleanup(ctxt); + rc2 = llog_cleanup(ctxt); + if (!rc) + rc = rc2; RETURN(rc); } diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c index 1436948..9fa802a 100644 --- a/lustre/mds/mds_log.c +++ b/lustre/mds/mds_log.c @@ -145,18 +145,18 @@ int mds_llog_init(struct obd_device *obd, struct obd_device *tgt, int mds_llog_finish(struct obd_device *obd, int count) { struct llog_ctxt *ctxt; - int rc = 0; + int rc = 0, rc2 = 0; ENTRY; ctxt = llog_get_context(obd, LLOG_UNLINK_ORIG_CTXT); if (ctxt) rc = llog_cleanup(ctxt); - if (rc) - RETURN(rc); ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT); if (ctxt) - rc = llog_cleanup(ctxt); - + rc2 = llog_cleanup(ctxt); + if (!rc) + rc = rc2; + RETURN(rc); } -- 1.8.3.1