mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
audit_tree,rcu: Convert call_rcu(__put_tree) to kfree_rcu()
The rcu callback __put_tree() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__put_tree). Signed-off-by: Lai Jiangshan <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Al Viro <[email protected]> Cc: Eric Paris <[email protected]> Reviewed-by: Josh Triplett <[email protected]>
This commit is contained in:
parent
6034f7e603
commit
3b097c4696
1 changed files with 1 additions and 7 deletions
|
|
@ -93,16 +93,10 @@ static inline void get_tree(struct audit_tree *tree)
|
|||
atomic_inc(&tree->count);
|
||||
}
|
||||
|
||||
static void __put_tree(struct rcu_head *rcu)
|
||||
{
|
||||
struct audit_tree *tree = container_of(rcu, struct audit_tree, head);
|
||||
kfree(tree);
|
||||
}
|
||||
|
||||
static inline void put_tree(struct audit_tree *tree)
|
||||
{
|
||||
if (atomic_dec_and_test(&tree->count))
|
||||
call_rcu(&tree->head, __put_tree);
|
||||
kfree_rcu(tree, head);
|
||||
}
|
||||
|
||||
/* to avoid bringing the entire thing in audit.h */
|
||||
|
|
|
|||
Loading…
Reference in a new issue