From patchwork Tue Dec 15 23:31:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 4837 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dkim=pass reason="1024-bit key; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=HCmfkMcI; dkim-adsp=pass; dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 700758194D for ; Wed, 16 Dec 2015 00:32:22 +0100 (CET) Received: from sven-desktop.home.narfation.org (unknown [IPv6:2a02:3100:260c:3afd:2066:82e6:79c1:88d8]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 0501E110102; Wed, 16 Dec 2015 00:32:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1450222342; bh=uv/30M0fnt4U3vShtPyCupU6V8JiDrBjpC8n62IMXGw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCmfkMcIruG1C6Z2oWOWaL7XRWSp3CK1b8aeVXCnGTb61/SXGdTruuvxHIqSeahXy t8IFBL6xDfbjVydxDd8PadkGrFot5XdzbkDIeJQuvXXzYH/v5MXCtwyvx3FkKDk7BN tDqLZ10inPYGu6OeC0NahDi7H1MfZdMtJ3G6qM14= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 16 Dec 2015 00:31:38 +0100 Message-Id: <1450222316-1764-5-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1450222316-1764-1-git-send-email-sven@narfation.org> References: <1450222316-1764-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 05/23] batman-adv: Drop batadv_hardif_neigh_free_rcu X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list 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: Tue, 15 Dec 2015 23:32:22 -0000 The refactoring of the batadv_hardif_neigh_node reference counting function converted batadv_hardif_neigh_free_rcu to basically kfree_rcu. Drop it and just use kfree_rcu instead. Signed-off-by: Sven Eckelmann --- net/batman-adv/originator.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 7735118..f39a715 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c @@ -209,28 +209,6 @@ void batadv_neigh_ifinfo_free_ref(struct batadv_neigh_ifinfo *neigh_ifinfo) } /** - * batadv_hardif_neigh_free - remove unreferenced hardif neighbor - * @hardif_neigh: hardif neigh neighbor to free - */ -static void -batadv_hardif_neigh_free(struct batadv_hardif_neigh_node *hardif_neigh) -{ - kfree(hardif_neigh); -} - -/** - * batadv_hardif_neigh_free_rcu - free the hardif neigh_node - * @rcu: rcu pointer of the neigh_node - */ -static void batadv_hardif_neigh_free_rcu(struct rcu_head *rcu) -{ - struct batadv_hardif_neigh_node *hardif_neigh; - - hardif_neigh = container_of(rcu, struct batadv_hardif_neigh_node, rcu); - batadv_hardif_neigh_free(hardif_neigh); -} - -/** * batadv_hardif_neigh_release - release hardif neigh node from lists and * queue for free after rcu grace period * * @ref: kref pointer of the neigh_node @@ -247,8 +225,7 @@ static void batadv_hardif_neigh_release(struct kref *ref) spin_unlock_bh(&hardif_neigh->if_incoming->neigh_list_lock); batadv_hardif_free_ref(hardif_neigh->if_incoming); - - call_rcu(&hardif_neigh->rcu, batadv_hardif_neigh_free_rcu); + kfree_rcu(hardif_neigh, rcu); } /**