lkml.org 
[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 34/36] 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 <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 fe38e30..2f3c614 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -778,13 +778,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;
@@ -797,7 +790,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)
--
1.7.4

\
 
 \ /
  Last update: 2011-03-18 05:13    [W:0.027 / U:2.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site