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]);