mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-22 16:06:04 -05:00
apparmor: cleanup __find_child()
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
39d84824ea
commit
ae3b316536
1 changed files with 14 additions and 14 deletions
|
@ -396,20 +396,6 @@ struct aa_profile *aa_new_null_profile(struct aa_profile *parent, bool hat,
|
||||||
|
|
||||||
/* TODO: profile accounting - setup in remove */
|
/* TODO: profile accounting - setup in remove */
|
||||||
|
|
||||||
/**
|
|
||||||
* __find_child - find a profile on @head list with a name matching @name
|
|
||||||
* @head: list to search (NOT NULL)
|
|
||||||
* @name: name of profile (NOT NULL)
|
|
||||||
*
|
|
||||||
* Requires: rcu_read_lock be held
|
|
||||||
*
|
|
||||||
* Returns: unrefcounted profile ptr, or NULL if not found
|
|
||||||
*/
|
|
||||||
static struct aa_profile *__find_child(struct list_head *head, const char *name)
|
|
||||||
{
|
|
||||||
return (struct aa_profile *)__policy_find(head, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __strn_find_child - find a profile on @head list using substring of @name
|
* __strn_find_child - find a profile on @head list using substring of @name
|
||||||
* @head: list to search (NOT NULL)
|
* @head: list to search (NOT NULL)
|
||||||
|
@ -426,6 +412,20 @@ static struct aa_profile *__strn_find_child(struct list_head *head,
|
||||||
return (struct aa_profile *)__policy_strn_find(head, name, len);
|
return (struct aa_profile *)__policy_strn_find(head, name, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __find_child - find a profile on @head list with a name matching @name
|
||||||
|
* @head: list to search (NOT NULL)
|
||||||
|
* @name: name of profile (NOT NULL)
|
||||||
|
*
|
||||||
|
* Requires: rcu_read_lock be held
|
||||||
|
*
|
||||||
|
* Returns: unrefcounted profile ptr, or NULL if not found
|
||||||
|
*/
|
||||||
|
static struct aa_profile *__find_child(struct list_head *head, const char *name)
|
||||||
|
{
|
||||||
|
return __strn_find_child(head, name, strlen(name));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aa_find_child - find a profile by @name in @parent
|
* aa_find_child - find a profile by @name in @parent
|
||||||
* @parent: profile to search (NOT NULL)
|
* @parent: profile to search (NOT NULL)
|
||||||
|
|
Loading…
Reference in a new issue