From patchwork Wed May 4 08:06:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 1018 Return-Path: Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 68E7D154494 for ; Wed, 4 May 2011 10:07:02 +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 E1A54940CF for ; Wed, 4 May 2011 10:07:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=mail; t=1304496436; bh=U/wefMrkeufSKt78dMfbVRpVOejx9cacF+5T3an6a8Y=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=AYURNaPj9q1OeHljpGRqj/6R3aCM97X+M0zHonbezTaGLjta+ZEZvQ/LZPk9PVCS1 QZpcfv1QFSy9io/81Gbe9kTg53pMHi4l3RR9SNSvaCTKoWFpcSCx+QbkVqj4uNXCbc PD+ehACEK7YrDVjTYW12oh8VkhsEMYI2ph6EYn9g= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 4 May 2011 10:06:33 +0200 Message-Id: <1304496393-16405-6-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 5/5] batman-adv: convert call_rcu(softif_neigh_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:07:02 -0000 From: Paul E. McKenney The RCU callback softif_neigh_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 --- soft-interface.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/soft-interface.c b/soft-interface.c index 9e5fcd1..85ae42d 100644 --- a/soft-interface.c +++ b/soft-interface.c @@ -72,18 +72,10 @@ int my_skb_head_push(struct sk_buff *skb, unsigned int len) return 0; } -static void softif_neigh_free_rcu(struct rcu_head *rcu) -{ - struct softif_neigh *softif_neigh; - - softif_neigh = container_of(rcu, struct softif_neigh, rcu); - kfree(softif_neigh); -} - static void softif_neigh_free_ref(struct softif_neigh *softif_neigh) { if (atomic_dec_and_test(&softif_neigh->refcount)) - call_rcu(&softif_neigh->rcu, softif_neigh_free_rcu); + kfree_rcu(softif_neigh, rcu); } static struct softif_neigh *softif_neigh_get_selected(struct bat_priv *bat_priv)