From 6b82669616fc99b30c9eabcdf0712775d80f987c Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 12 Sep 2008 22:16:23 +0000 Subject: [PATCH] Branch b1_8_gate Fix up error message for debugging. --- lustre/include/lustre_log.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h index 129459d..c6d6ebd 100644 --- a/lustre/include/lustre_log.h +++ b/lustre/include/lustre_log.h @@ -416,14 +416,16 @@ static inline struct llog_ctxt *llog_get_context(struct obd_device *obd, int index) { struct llog_ctxt *ctxt; - - if (index < 0 || index >= LLOG_MAX_CTXTS) + + if (index < 0 || index >= LLOG_MAX_CTXTS) { + CDEBUG(D_INFO, "obd %p bad index %d\n", obd, index); return NULL; - - spin_lock(&obd->obd_dev_lock); + } + + spin_lock(&obd->obd_dev_lock); if (obd->obd_llog_ctxt[index] == NULL) { spin_unlock(&obd->obd_dev_lock); - CDEBUG(D_INFO, "obd %p and ctxt index %d is NULL \n", obd, index); + CDEBUG(D_INFO,"obd %p and ctxt index %d is NULL \n",obd,index); return NULL; } ctxt = llog_ctxt_get(obd->obd_llog_ctxt[index]); -- 1.8.3.1