Skip to content

Commit

Permalink
vmalloc,rcu: Convert call_rcu(rcu_free_vb) to kfree_rcu()
Browse files Browse the repository at this point in the history
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 <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
  • Loading branch information
Lai Jiangshan authored and Paul E. McKenney committed Jul 20, 2011
1 parent 14769de commit 22a3c7d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 22a3c7d

Please sign in to comment.