diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-05-20 18:31:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-21 02:05:22 -0400 |
commit | 0a384b226f61b310586701669b573b49cfcbf436 (patch) | |
tree | e1fb1a74d916b14f327cb01cbb02f2b45ae6cf35 /net | |
parent | 0f6c6392dca9c4825c98322a1bf74991e4f0f54d (diff) | |
download | linux-3.10-0a384b226f61b310586701669b573b49cfcbf436.tar.gz linux-3.10-0a384b226f61b310586701669b573b49cfcbf436.tar.bz2 linux-3.10-0a384b226f61b310586701669b573b49cfcbf436.zip |
garp: use kfree_rcu()
Use kfree_rcu() instead of call_rcu(), remove garp_cleanup_module()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/802/garp.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/net/802/garp.c b/net/802/garp.c index f8300a8b5fb..16102951d36 100644 --- a/net/802/garp.c +++ b/net/802/garp.c @@ -544,11 +544,6 @@ static int garp_init_port(struct net_device *dev) return 0; } -static void garp_kfree_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct garp_port, rcu)); -} - static void garp_release_port(struct net_device *dev) { struct garp_port *port = rtnl_dereference(dev->garp_port); @@ -559,7 +554,7 @@ static void garp_release_port(struct net_device *dev) return; } rcu_assign_pointer(dev->garp_port, NULL); - call_rcu(&port->rcu, garp_kfree_rcu); + kfree_rcu(port, rcu); } int garp_init_applicant(struct net_device *dev, struct garp_application *appl) @@ -603,11 +598,6 @@ err1: } EXPORT_SYMBOL_GPL(garp_init_applicant); -static void garp_app_kfree_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct garp_applicant, rcu)); -} - void garp_uninit_applicant(struct net_device *dev, struct garp_application *appl) { struct garp_port *port = rtnl_dereference(dev->garp_port); @@ -625,7 +615,7 @@ void garp_uninit_applicant(struct net_device *dev, struct garp_application *appl garp_queue_xmit(app); dev_mc_del(dev, appl->proto.group_address); - call_rcu(&app->rcu, garp_app_kfree_rcu); + kfree_rcu(app, rcu); garp_release_port(dev); } EXPORT_SYMBOL_GPL(garp_uninit_applicant); @@ -643,9 +633,3 @@ void garp_unregister_application(struct garp_application *appl) stp_proto_unregister(&appl->proto); } EXPORT_SYMBOL_GPL(garp_unregister_application); - -static void __exit garp_cleanup_module(void) -{ - rcu_barrier(); /* Wait for completion of call_rcu()'s */ -} -module_exit(garp_cleanup_module); |