diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 21:14:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-19 21:14:34 -0400 |
commit | eb04f2f04ed1227c266b3219c0aaeda525639718 (patch) | |
tree | 7f224483a3cd0e439cd64a8666ec9dc5ed178a3d /net/ipv6 | |
parent | 5765040ebfc9a28d9dcfaaaaf3d25840d922de96 (diff) | |
parent | 80d02085d99039b3b7f3a73c8896226b0cb1ba07 (diff) |
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits)
Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()
batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu
net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()
net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()
net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()
net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()
perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
perf,rcu: convert call_rcu(free_ctx) to kfree_rcu()
net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()
net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()
net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()
security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()
net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()
net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()
...
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 16 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 8 | ||||
-rw-r--r-- | net/ipv6/sit.c | 7 |
3 files changed, 5 insertions, 26 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a7bda0757053..8f13d88d7dba 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -317,12 +317,6 @@ static void snmp6_free_dev(struct inet6_dev *idev) | |||
317 | 317 | ||
318 | /* Nobody refers to this device, we may destroy it. */ | 318 | /* Nobody refers to this device, we may destroy it. */ |
319 | 319 | ||
320 | static void in6_dev_finish_destroy_rcu(struct rcu_head *head) | ||
321 | { | ||
322 | struct inet6_dev *idev = container_of(head, struct inet6_dev, rcu); | ||
323 | kfree(idev); | ||
324 | } | ||
325 | |||
326 | void in6_dev_finish_destroy(struct inet6_dev *idev) | 320 | void in6_dev_finish_destroy(struct inet6_dev *idev) |
327 | { | 321 | { |
328 | struct net_device *dev = idev->dev; | 322 | struct net_device *dev = idev->dev; |
@@ -339,7 +333,7 @@ void in6_dev_finish_destroy(struct inet6_dev *idev) | |||
339 | return; | 333 | return; |
340 | } | 334 | } |
341 | snmp6_free_dev(idev); | 335 | snmp6_free_dev(idev); |
342 | call_rcu(&idev->rcu, in6_dev_finish_destroy_rcu); | 336 | kfree_rcu(idev, rcu); |
343 | } | 337 | } |
344 | 338 | ||
345 | EXPORT_SYMBOL(in6_dev_finish_destroy); | 339 | EXPORT_SYMBOL(in6_dev_finish_destroy); |
@@ -535,12 +529,6 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old) | |||
535 | } | 529 | } |
536 | #endif | 530 | #endif |
537 | 531 | ||
538 | static void inet6_ifa_finish_destroy_rcu(struct rcu_head *head) | ||
539 | { | ||
540 | struct inet6_ifaddr *ifp = container_of(head, struct inet6_ifaddr, rcu); | ||
541 | kfree(ifp); | ||
542 | } | ||
543 | |||
544 | /* Nobody refers to this ifaddr, destroy it */ | 532 | /* Nobody refers to this ifaddr, destroy it */ |
545 | void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) | 533 | void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) |
546 | { | 534 | { |
@@ -561,7 +549,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) | |||
561 | } | 549 | } |
562 | dst_release(&ifp->rt->dst); | 550 | dst_release(&ifp->rt->dst); |
563 | 551 | ||
564 | call_rcu(&ifp->rcu, inet6_ifa_finish_destroy_rcu); | 552 | kfree_rcu(ifp, rcu); |
565 | } | 553 | } |
566 | 554 | ||
567 | static void | 555 | static void |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 76b893771e6e..f2d98ca7588a 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -201,10 +201,6 @@ int ipv6_sock_mc_join(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
204 | static void ipv6_mc_socklist_reclaim(struct rcu_head *head) | ||
205 | { | ||
206 | kfree(container_of(head, struct ipv6_mc_socklist, rcu)); | ||
207 | } | ||
208 | /* | 204 | /* |
209 | * socket leave on multicast group | 205 | * socket leave on multicast group |
210 | */ | 206 | */ |
@@ -239,7 +235,7 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
239 | (void) ip6_mc_leave_src(sk, mc_lst, NULL); | 235 | (void) ip6_mc_leave_src(sk, mc_lst, NULL); |
240 | rcu_read_unlock(); | 236 | rcu_read_unlock(); |
241 | atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc); | 237 | atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc); |
242 | call_rcu(&mc_lst->rcu, ipv6_mc_socklist_reclaim); | 238 | kfree_rcu(mc_lst, rcu); |
243 | return 0; | 239 | return 0; |
244 | } | 240 | } |
245 | } | 241 | } |
@@ -307,7 +303,7 @@ void ipv6_sock_mc_close(struct sock *sk) | |||
307 | rcu_read_unlock(); | 303 | rcu_read_unlock(); |
308 | 304 | ||
309 | atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc); | 305 | atomic_sub(sizeof(*mc_lst), &sk->sk_omem_alloc); |
310 | call_rcu(&mc_lst->rcu, ipv6_mc_socklist_reclaim); | 306 | kfree_rcu(mc_lst, rcu); |
311 | 307 | ||
312 | spin_lock(&ipv6_sk_mc_lock); | 308 | spin_lock(&ipv6_sk_mc_lock); |
313 | } | 309 | } |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 43b33373adb2..5f35d595e4a5 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -401,11 +401,6 @@ out: | |||
401 | return err; | 401 | return err; |
402 | } | 402 | } |
403 | 403 | ||
404 | static void prl_entry_destroy_rcu(struct rcu_head *head) | ||
405 | { | ||
406 | kfree(container_of(head, struct ip_tunnel_prl_entry, rcu_head)); | ||
407 | } | ||
408 | |||
409 | static void prl_list_destroy_rcu(struct rcu_head *head) | 404 | static void prl_list_destroy_rcu(struct rcu_head *head) |
410 | { | 405 | { |
411 | struct ip_tunnel_prl_entry *p, *n; | 406 | struct ip_tunnel_prl_entry *p, *n; |
@@ -433,7 +428,7 @@ ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a) | |||
433 | p = &x->next) { | 428 | p = &x->next) { |
434 | if (x->addr == a->addr) { | 429 | if (x->addr == a->addr) { |
435 | *p = x->next; | 430 | *p = x->next; |
436 | call_rcu(&x->rcu_head, prl_entry_destroy_rcu); | 431 | kfree_rcu(x, rcu_head); |
437 | t->prl_count--; | 432 | t->prl_count--; |
438 | goto out; | 433 | goto out; |
439 | } | 434 | } |