Commit 3b097c46964b07479855b01056c61540b8cadd50

Authored by Lai Jiangshan
Committed by Paul E. McKenney
1 parent 6034f7e603

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 <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Showing 1 changed file with 1 additions and 7 deletions Side-by-side Diff

... ... @@ -93,16 +93,10 @@
93 93 atomic_inc(&tree->count);
94 94 }
95 95  
96   -static void __put_tree(struct rcu_head *rcu)
97   -{
98   - struct audit_tree *tree = container_of(rcu, struct audit_tree, head);
99   - kfree(tree);
100   -}
101   -
102 96 static inline void put_tree(struct audit_tree *tree)
103 97 {
104 98 if (atomic_dec_and_test(&tree->count))
105   - call_rcu(&tree->head, __put_tree);
  99 + kfree_rcu(tree, head);
106 100 }
107 101  
108 102 /* to avoid bringing the entire thing in audit.h */