net,rcu: convert call_rcu(__leaf_info_free_rcu) to kfree_rcu()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Fri, 18 Mar 2011 03:42:34 +0000 (11:42 +0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 8 May 2011 05:50:56 +0000 (22:50 -0700)
The rcu callback __leaf_info_free_rcu() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(__leaf_info_free_rcu).

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
net/ipv4/fib_trie.c

index 5fe9b8b41df34fe8cdf7af72ce10138a3f92191a..11d4d28190bddcf462d9e0859745d3bdcbb7bdb8 100644 (file)
@@ -350,14 +350,9 @@ static inline void free_leaf(struct leaf *l)
        call_rcu_bh(&l->rcu, __leaf_free_rcu);
 }
 
-static void __leaf_info_free_rcu(struct rcu_head *head)
-{
-       kfree(container_of(head, struct leaf_info, rcu));
-}
-
 static inline void free_leaf_info(struct leaf_info *leaf)
 {
-       call_rcu(&leaf->rcu, __leaf_info_free_rcu);
+       kfree_rcu(leaf, rcu);
 }
 
 static struct tnode *tnode_alloc(size_t size)