aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-01-03 14:23:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-17 16:16:58 -0500
commita4ff8dba7d8ce5ceb43fb27df66292251cc73bdc (patch)
tree2c89a0a7a7dad853a2c2ec70417ef2f3f5a04fd4 /include
parent38cdce53daa0408a61fe6d86fe48f31515c9b840 (diff)
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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 4f1efe3e861..8eb8bda749b 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -417,7 +417,7 @@ extern int audit_classify_arch(int arch);
417 /* Public API */ 417 /* Public API */
418extern void audit_finish_fork(struct task_struct *child); 418extern void audit_finish_fork(struct task_struct *child);
419extern int audit_alloc(struct task_struct *task); 419extern int audit_alloc(struct task_struct *task);
420extern void audit_free(struct task_struct *task); 420extern void __audit_free(struct task_struct *task);
421extern void __audit_syscall_entry(int arch, 421extern void __audit_syscall_entry(int arch,
422 int major, unsigned long a0, unsigned long a1, 422 int major, unsigned long a0, unsigned long a1,
423 unsigned long a2, unsigned long a3); 423 unsigned long a2, unsigned long a3);
@@ -435,6 +435,11 @@ static inline int audit_dummy_context(void)
435 void *p = current->audit_context; 435 void *p = current->audit_context;
436 return !p || *(int *)p; 436 return !p || *(int *)p;
437} 437}
438static inline void audit_free(struct task_struct *task)
439{
440 if (unlikely(task->audit_context))
441 __audit_free(task);
442}
438static inline void audit_syscall_entry(int arch, int major, unsigned long a0, 443static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
439 unsigned long a1, unsigned long a2, 444 unsigned long a1, unsigned long a2,
440 unsigned long a3) 445 unsigned long a3)