Whamcloud - gitweb
Branch b1_8_gate
authoradilger <adilger>
Fri, 12 Sep 2008 22:16:23 +0000 (22:16 +0000)
committeradilger <adilger>
Fri, 12 Sep 2008 22:16:23 +0000 (22:16 +0000)
Fix up error message for debugging.

lustre/include/lustre_log.h

index 129459d..c6d6ebd 100644 (file)
@@ -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]);