Skip to content

Commit

Permalink
vmalloc,rcu: Convert call_rcu(rcu_free_va) to kfree_rcu()
Browse files Browse the repository at this point in the history
The rcu callback rcu_free_va() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(rcu_free_va).

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 d4ee9aa commit 14769de
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 @@ -452,13 +452,6 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
return ERR_PTR(-EBUSY);
}

static void rcu_free_va(struct rcu_head *head)
{
struct vmap_area *va = container_of(head, struct vmap_area, rcu_head);

kfree(va);
}

static void __free_vmap_area(struct vmap_area *va)
{
BUG_ON(RB_EMPTY_NODE(&va->rb_node));
Expand Down Expand Up @@ -491,7 +484,7 @@ static void __free_vmap_area(struct vmap_area *va)
if (va->va_end > VMALLOC_START && va->va_end <= VMALLOC_END)
vmap_area_pcpu_hole = max(vmap_area_pcpu_hole, va->va_end);

call_rcu(&va->rcu_head, rcu_free_va);
kfree_rcu(va, rcu_head);
}

/*
Expand Down

0 comments on commit 14769de

Please sign in to comment.