Skip to content

Commit 679173b

Browse files
eparisAl Viro
authored andcommitted
audit: audit_set_auditable defined but not used
after 0590b93 audit_set_auditable() is now only used by the audit tree code. If CONFIG_AUDIT_TREE is unset it will be defined but unused. This patch simply moves the function inside a CONFIG_AUDIT_TREE block. cc1: warnings being treated as errors /home/acme_unencrypted/git/linux-2.6-tip/kernel/auditsc.c:745: error: ‘audit_set_auditable’ defined but not used make[2]: *** [kernel/auditsc.o] Error 1 make[1]: *** [kernel] Error 2 make[1]: *** Waiting for unfinished jobs.... Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 318b6d3 commit 679173b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎kernel/auditsc.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,14 @@ static int audit_match_filetype(struct audit_context *ctx, int which)
329329
*/
330330

331331
#ifdef CONFIG_AUDIT_TREE
332+
static void audit_set_auditable(struct audit_context *ctx)
333+
{
334+
if (!ctx->prio) {
335+
ctx->prio = 1;
336+
ctx->current_state = AUDIT_RECORD_CONTEXT;
337+
}
338+
}
339+
332340
static int put_tree_ref(struct audit_context *ctx, struct audit_chunk *chunk)
333341
{
334342
struct audit_tree_refs *p = ctx->trees;
@@ -742,14 +750,6 @@ void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx)
742750
rcu_read_unlock();
743751
}
744752

745-
static void audit_set_auditable(struct audit_context *ctx)
746-
{
747-
if (!ctx->prio) {
748-
ctx->prio = 1;
749-
ctx->current_state = AUDIT_RECORD_CONTEXT;
750-
}
751-
}
752-
753753
static inline struct audit_context *audit_get_context(struct task_struct *tsk,
754754
int return_valid,
755755
long return_code)

0 commit comments

Comments
 (0)