Whamcloud - gitweb
Branch b1_4
[fs/lustre-release.git] / lustre / mds / mds_audit_path.c
index 8b4b2f8..637aeea 100644 (file)
@@ -450,6 +450,8 @@ local_scan_audit_log(struct obd_device *obd, struct parseid_pkg *pkg)
         if (rc != LLOG_PROC_BREAK) {
                 CWARN("process catalog log failed: rc(%d)\n", rc);
                 rc = -ENOENT;
+        } else {
+                rc = 0;
         }
 out:
         pkg->pp_rc = rc;
@@ -549,7 +551,7 @@ mds_audit_id2name(struct obd_device *obd, char **name, int *namelen,
         INIT_LIST_HEAD(&list);
 
         cur_id = *id;
-        if (!id_fid(&cur_id)) {
+        if (!id_ino(&cur_id)) {
                 CERROR("Invalid id!\n");
                 RETURN(-EINVAL);
         }
@@ -561,7 +563,6 @@ next:
         rc = mds_id2name(obd, &cur_id, &list, &parent_id);
         if (rc == -ENOENT) {
                 /* can't reconstruct name from id, turn to audit log */
-                LASSERT(id_fid(&parent_id));
                 cur_id = parent_id;
                 memset(&parent_id, 0, sizeof(parent_id));
 
@@ -599,7 +600,8 @@ out:
                 }
                 list_del_init(&item->link);
                 OBD_FREE(item, sizeof(*item));
-                LASSERT(strlen(*name) < *namelen);
+                if (*name)
+                        LASSERT(strlen(*name) < *namelen);
         }
         RETURN(rc);
 }