linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 33/36] vmalloc,rcu: convert call_rcu(rcu_free_va) to kfree_rcu()
@ 2011-03-18  4:12 Lai Jiangshan
  0 siblings, 0 replies; only message in thread
From: Lai Jiangshan @ 2011-03-18  4:12 UTC (permalink / raw)
  To: Paul E. McKenney, Ingo Molnar, Andrew Morton, David Rientjes,
	Namhyung Kim, Pekka Enberg, Jeremy Fitzhardinge, linux-mm,
	linux-kernel



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>
---
 mm/vmalloc.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index f9b1667..fe38e30 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -416,13 +416,6 @@ overflow:
 	return va;
 }
 
-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));
@@ -439,7 +432,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);
 }
 
 /*
-- 
1.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-18  4:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18  4:12 [PATCH 33/36] vmalloc,rcu: convert call_rcu(rcu_free_va) to kfree_rcu() Lai Jiangshan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).