Skip to content

Commit

Permalink
audit: audit_set_auditable defined but not used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
eparis authored and Al Viro committed Apr 5, 2009
1 parent 318b6d3 commit 679173b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,14 @@ static int audit_match_filetype(struct audit_context *ctx, int which)
*/

#ifdef CONFIG_AUDIT_TREE
static void audit_set_auditable(struct audit_context *ctx)
{
if (!ctx->prio) {
ctx->prio = 1;
ctx->current_state = AUDIT_RECORD_CONTEXT;
}
}

static int put_tree_ref(struct audit_context *ctx, struct audit_chunk *chunk)
{
struct audit_tree_refs *p = ctx->trees;
Expand Down Expand Up @@ -742,14 +750,6 @@ void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx)
rcu_read_unlock();
}

static void audit_set_auditable(struct audit_context *ctx)
{
if (!ctx->prio) {
ctx->prio = 1;
ctx->current_state = AUDIT_RECORD_CONTEXT;
}
}

static inline struct audit_context *audit_get_context(struct task_struct *tsk,
int return_valid,
long return_code)
Expand Down

0 comments on commit 679173b

Please sign in to comment.