Whamcloud - gitweb
b=8654
[fs/lustre-release.git] / lustre / mds / mds_audit.c
index 4811954..08c54b4 100644 (file)
@@ -67,9 +67,12 @@ int mds_audit(struct ptlrpc_request *req, struct dentry *dentry,
                 .namelen = 0,
         };
         int rc = 0;
-        
         ENTRY;
         
+        /* don't catch request to cross-ref */
+        if (dentry->d_flags & DCACHE_CROSS_REF)
+                RETURN(0);
+        
         info.m.nid = nid;
         info.m.uid = current->uid;
         info.m.gid = current->gid;
@@ -260,7 +263,8 @@ int mds_set_audit(struct obd_device * obd, void * val)
         if (inode && S_ISREG(inode->i_mode))
                 mds_set_obj_audit(obd, inode, &msg->attr);
         
-        l_dput(dentry);
+        if (dentry)
+                l_dput(dentry);
         
         //pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);