From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lai Jiangshan Subject: [PATCH 12/17] block, rcu: convert call_rcu(cfq_cfqd_free) to kfree_rcu() Date: Tue, 15 Mar 2011 18:06:07 +0800 Message-ID: <4D7F3A0F.1050403@cn.fujitsu.com> References: <4D7F3610.6000809@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D7F3610.6000809-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Ingo Molnar , "Paul E. McKenney" , Jens Axboe , Trond Myklebust List-Id: containers.vger.kernel.org The rcu callback cfq_cfqd_free() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(cfq_cfqd_free). Signed-off-by: Lai Jiangshan --- block/cfq-iosched.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ea83a4f..32fe43e 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3812,11 +3812,6 @@ static void cfq_put_async_queues(struct cfq_data *cfqd) cfq_put_queue(cfqd->async_idle_cfqq); } -static void cfq_cfqd_free(struct rcu_head *head) -{ - kfree(container_of(head, struct cfq_data, rcu)); -} - static void cfq_exit_queue(struct elevator_queue *e) { struct cfq_data *cfqd = e->elevator_data; @@ -3850,7 +3845,7 @@ static void cfq_exit_queue(struct elevator_queue *e) spin_unlock(&cic_index_lock); /* Wait for cfqg->blkg->key accessors to exit their grace periods. */ - call_rcu(&cfqd->rcu, cfq_cfqd_free); + kfree_rcu(cfqd, rcu); } static int cfq_alloc_cic_index(void) -- 1.7.4