- fix duplicate name in open/stat auditing. Name is needed only if lustre id cannot be saved.
if (resent_req == 0 && (dparent || dchild)) {
struct inode * au_inode = NULL;
- if (dchild && dchild->d_inode)
+ if (dchild && dchild->d_inode) {
au_inode = dchild->d_inode;
- else
+ mds_audit_stat(req, &body->id1, au_inode,
+ NULL, 0, rc);
+ } else {
au_inode = dparent->d_inode;
-
- mds_audit_stat(req, &body->id1, au_inode, name, namesize, rc);
+ mds_audit_stat(req, &body->id1, au_inode,
+ name, namesize, rc);
+ }
}
switch (cleanup_phase) {
case 2:
};
int len, rc = 0;
void *lmm = NULL;
+ ENTRY;
down(&inode->i_sem);
len = fsfilt_get_md(obd, inode, NULL, 0, EA_LOV);
if (au_inode == NULL) {
au_inode = dparent->d_inode;
au_id = *(rec->ur_id1);
+ mds_audit_open(req, &au_id, au_inode,
+ rec->ur_name, rec->ur_namelen,
+ rc);
} else {
if (fid == 0)
mds_read_inode_sid(obd, au_inode, &au_id);
else
mds_inode2id(obd, &au_id, au_inode, fid);
+ mds_audit_open(req, &au_id, au_inode,
+ NULL, 0, rc);
}
- mds_audit_open(req, &au_id, au_inode,
- rec->ur_name, rec->ur_namelen, rc);
}
l_dput(dchild);