aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-10-10 15:25:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-12 00:32:00 -0400
commitc43a25abba97c7d87131e71db6be24b24d7791a5 (patch)
tree0fe959853254064e17805ca111838e7869720e43 /include/linux/audit.h
parent9cec9d68ae53aae60b4a1fca4505c75a1d026392 (diff)
audit: reverse arguments to audit_inode_child
Most of the callers get called with an inode and dentry in the reverse order. The compiler then has to reshuffle the arg registers and/or stack in order to pass them on to audit_inode_child. Reverse those arguments for a micro-optimization. Reported-by: Eric Paris <eparis@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 2c83e5f7edb1..8c66fc248c75 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -464,8 +464,8 @@ extern void __audit_syscall_exit(int ret_success, long ret_value);
464extern void __audit_getname(const char *name); 464extern void __audit_getname(const char *name);
465extern void audit_putname(const char *name); 465extern void audit_putname(const char *name);
466extern void __audit_inode(const char *name, const struct dentry *dentry); 466extern void __audit_inode(const char *name, const struct dentry *dentry);
467extern void __audit_inode_child(const struct dentry *dentry, 467extern void __audit_inode_child(const struct inode *parent,
468 const struct inode *parent); 468 const struct dentry *dentry);
469extern void __audit_seccomp(unsigned long syscall, long signr, int code); 469extern void __audit_seccomp(unsigned long syscall, long signr, int code);
470extern void __audit_ptrace(struct task_struct *t); 470extern void __audit_ptrace(struct task_struct *t);
471 471
@@ -504,10 +504,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) {
504 if (unlikely(!audit_dummy_context())) 504 if (unlikely(!audit_dummy_context()))
505 __audit_inode(name, dentry); 505 __audit_inode(name, dentry);
506} 506}
507static inline void audit_inode_child(const struct dentry *dentry, 507static inline void audit_inode_child(const struct inode *parent,
508 const struct inode *parent) { 508 const struct dentry *dentry) {
509 if (unlikely(!audit_dummy_context())) 509 if (unlikely(!audit_dummy_context()))
510 __audit_inode_child(dentry, parent); 510 __audit_inode_child(parent, dentry);
511} 511}
512void audit_core_dumps(long signr); 512void audit_core_dumps(long signr);
513 513
@@ -657,13 +657,13 @@ static inline void audit_putname(const char *name)
657{ } 657{ }
658static inline void __audit_inode(const char *name, const struct dentry *dentry) 658static inline void __audit_inode(const char *name, const struct dentry *dentry)
659{ } 659{ }
660static inline void __audit_inode_child(const struct dentry *dentry, 660static inline void __audit_inode_child(const struct inode *parent,
661 const struct inode *parent) 661 const struct dentry *dentry)
662{ } 662{ }
663static inline void audit_inode(const char *name, const struct dentry *dentry) 663static inline void audit_inode(const char *name, const struct dentry *dentry)
664{ } 664{ }
665static inline void audit_inode_child(const struct dentry *dentry, 665static inline void audit_inode_child(const struct inode *parent,
666 const struct inode *parent) 666 const struct dentry *dentry)
667{ } 667{ }
668static inline void audit_core_dumps(long signr) 668static inline void audit_core_dumps(long signr)
669{ } 669{ }