Whamcloud - gitweb
LU-2683 lov: release all locks in closure to release sublock
[fs/lustre-release.git] / lustre / obdclass / llog_cat.c
index 3fe67f6..fbf2766 100644 (file)
@@ -194,6 +194,7 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle,
        rc = llog_init_handle(env, loghandle, LLOG_F_IS_PLAIN, NULL);
        if (rc < 0) {
                llog_close(env, loghandle);
+               loghandle = NULL;
                RETURN(rc);
        }
 
@@ -348,8 +349,9 @@ int llog_cat_add_rec(const struct lu_env *env, struct llog_handle *cathandle,
        }
        /* now let's try to add the record */
        rc = llog_write_rec(env, loghandle, rec, reccookie, 1, buf, -1, th);
-        if (rc < 0)
-                CERROR("llog_write_rec %d: lh=%p\n", rc, loghandle);
+       if (rc < 0)
+               CDEBUG_LIMIT(rc == -ENOSPC ? D_HA : D_ERROR,
+                            "llog_write_rec %d: lh=%p\n", rc, loghandle);
        up_write(&loghandle->lgh_lock);
         if (rc == -ENOSPC) {
                /* try to use next log */
@@ -842,8 +844,7 @@ int cat_cancel_cb(const struct lu_env *env, struct llog_handle *cathandle,
        ENTRY;
 
        if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-               CERROR("%s: invalid record in catalog\n",
-                      loghandle->lgh_ctxt->loc_obd->obd_name);
+               CERROR("invalid record in catalog\n");
                RETURN(-EINVAL);
        }
        CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog "