From patchwork Wed May 4 08:06:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 961 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id D96BC154214 for ; Wed, 4 May 2011 10:06:58 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@narfation.org; dkim-adsp=pass Received: from sven-desktop.home.narfation.org (bathseba.informatik.tu-chemnitz.de [134.109.192.185]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 6B528940E7 for ; Wed, 4 May 2011 10:07:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1304496431; bh=ktLtqenlnQ9JhZZcIt0Y9ZUn7YOXCag7mKfmbIuG88I=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=ddjePzEhYKIcoW59CU2IRQOTvTFohHL5VHmBToRFX7STtWyJLICuX5q1PB7SG2KEy SLtvB5CyOtDJXvnjSmzKMe6eIZLMto7uFmAZ8aE9L8gwLcBrGqe+DHQ5fBxztza3ph ycc9ICRVIZ3Q9wc83auw+Kq+RzWVXud/7JRdMe78= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 4 May 2011 10:06:31 +0200 Message-Id: <1304496393-16405-4-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1304496393-16405-1-git-send-email-sven@narfation.org> References: <1304496393-16405-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: convert call_rcu(gw_node_free_rcu) to kfree_rcu X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2011 08:06:59 -0000 From: Paul E. McKenney The RCU callback gw_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney Cc: Marek Lindner Cc: Simon Wunderlich Cc: Sven Eckelmann Acked-by: David S. Miller Signed-off-by: Sven Eckelmann --- gateway_client.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/gateway_client.c b/gateway_client.c index 65f3953..61605a0 100644 --- a/gateway_client.c +++ b/gateway_client.c @@ -29,18 +29,10 @@ #include #include -static void gw_node_free_rcu(struct rcu_head *rcu) -{ - struct gw_node *gw_node; - - gw_node = container_of(rcu, struct gw_node, rcu); - kfree(gw_node); -} - static void gw_node_free_ref(struct gw_node *gw_node) { if (atomic_dec_and_test(&gw_node->refcount)) - call_rcu(&gw_node->rcu, gw_node_free_rcu); + kfree_rcu(gw_node, rcu); } static struct gw_node *gw_get_selected_gw_node(struct bat_priv *bat_priv)