From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 5/5] batman-adv: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
Date: Wed, 4 May 2011 10:06:33 +0200 [thread overview]
Message-ID: <1304496393-16405-6-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1304496393-16405-1-git-send-email-sven@narfation.org>
From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
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 <paulmck@linux.vnet.ibm.com>
Cc: Marek Lindner <lindner_marek@yahoo.de>
Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Cc: Sven Eckelmann <sven@narfation.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
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)
--
1.7.4.4
next prev parent reply other threads:[~2011-05-04 8:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 8:06 [B.A.T.M.A.N.] kfree_rcu patches Sven Eckelmann
2011-05-04 8:06 ` [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Rename bat_printk.c to compat.c Sven Eckelmann
2011-05-07 18:00 ` Marek Lindner
2011-05-04 8:06 ` [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: Add compatibility code for kfree_rcu Sven Eckelmann
2011-05-04 11:51 ` Marek Lindner
2011-05-04 19:11 ` [B.A.T.M.A.N.] [PATCH-Marek " Sven Eckelmann
2011-05-04 8:06 ` [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: convert call_rcu(gw_node_free_rcu) to kfree_rcu Sven Eckelmann
2011-05-04 8:06 ` [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: convert call_rcu(neigh_node_free_rcu) to kfree() Sven Eckelmann
2011-05-04 8:06 ` Sven Eckelmann [this message]
2011-05-10 7:16 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: Add compatibility code for kfree_rcu Sven Eckelmann
2011-05-10 7:16 ` [B.A.T.M.A.N.] [PATCHv2 2/4] batman-adv: convert call_rcu(gw_node_free_rcu) to kfree_rcu Sven Eckelmann
2011-05-20 12:29 ` Sven Eckelmann
2011-05-10 7:17 ` [B.A.T.M.A.N.] [PATCHv2 3/4] batman-adv: convert call_rcu(neigh_node_free_rcu) to kfree() Sven Eckelmann
2011-05-20 12:29 ` Sven Eckelmann
2011-05-10 7:17 ` [B.A.T.M.A.N.] [PATCHv2 4/4] batman-adv: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu Sven Eckelmann
2011-05-20 12:30 ` Sven Eckelmann
2011-05-20 12:27 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: Add compatibility code for kfree_rcu Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304496393-16405-6-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).