diff options
author | Eric Paris <eparis@redhat.com> | 2012-01-03 14:23:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-17 16:16:58 -0500 |
commit | a4ff8dba7d8ce5ceb43fb27df66292251cc73bdc (patch) | |
tree | 2c89a0a7a7dad853a2c2ec70417ef2f3f5a04fd4 /include | |
parent | 38cdce53daa0408a61fe6d86fe48f31515c9b840 (diff) | |
download | linux-a4ff8dba7d8ce5ceb43fb27df66292251cc73bdc.tar.bz2 |
audit: inline audit_free to simplify the look of generic code
make the conditional a static inline instead of doing it in generic code.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/audit.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4f1efe3e8616..8eb8bda749b3 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -417,7 +417,7 @@ extern int audit_classify_arch(int arch); /* Public API */ extern void audit_finish_fork(struct task_struct *child); extern int audit_alloc(struct task_struct *task); -extern void audit_free(struct task_struct *task); +extern void __audit_free(struct task_struct *task); extern void __audit_syscall_entry(int arch, int major, unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3); @@ -435,6 +435,11 @@ static inline int audit_dummy_context(void) void *p = current->audit_context; return !p || *(int *)p; } +static inline void audit_free(struct task_struct *task) +{ + if (unlikely(task->audit_context)) + __audit_free(task); +} static inline void audit_syscall_entry(int arch, int major, unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3) |