From: Lai Jiangshan Date: Fri, 18 Mar 2011 04:13:08 +0000 (+0800) Subject: vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu() X-Git-Tag: next-20110811~12^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=36216ac97e95e7334331d0e1e56f582a2e5170fa;p=karo-tx-linux.git vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu() The rcu callback rcu_free_vb() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(rcu_free_vb). Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney Cc: Andrew Morton Cc: Namhyung Kim Cc: David Rientjes Reviewed-by: Josh Triplett --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 7ff9560e2f83..ab8494cde007 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -830,13 +830,6 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) return vb; } -static void rcu_free_vb(struct rcu_head *head) -{ - struct vmap_block *vb = container_of(head, struct vmap_block, rcu_head); - - kfree(vb); -} - static void free_vmap_block(struct vmap_block *vb) { struct vmap_block *tmp; @@ -849,7 +842,7 @@ static void free_vmap_block(struct vmap_block *vb) BUG_ON(tmp != vb); free_vmap_area_noflush(vb->va); - call_rcu(&vb->rcu_head, rcu_free_vb); + kfree_rcu(vb, rcu_head); } static void purge_fragmented_blocks(int cpu)