diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 19:24:02 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-20 19:24:02 -0400 |
| commit | ff446f2001cf9b5ed97c6256c4ee3549d3b7abed (patch) | |
| tree | ec5fd60a8b9c21ae85eaa99003f26e6c342e2234 /net/ipv4/inetpeer.c | |
| parent | 78091dc2f6f04b03131218df590c877cadcd9379 (diff) | |
| parent | 485802a6c524e62b5924849dd727ddbb1497cc71 (diff) | |
Merge 3.5-rc3 into usb-next
This lets us catch the USB fixes that went into 3.5-rc3 into this branch,
as we want them here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/inetpeer.c')
| -rw-r--r-- | net/ipv4/inetpeer.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index d4d61b694fab..dfba343b2509 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
| @@ -560,6 +560,17 @@ bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout) | |||
| 560 | } | 560 | } |
| 561 | EXPORT_SYMBOL(inet_peer_xrlim_allow); | 561 | EXPORT_SYMBOL(inet_peer_xrlim_allow); |
| 562 | 562 | ||
| 563 | static void inetpeer_inval_rcu(struct rcu_head *head) | ||
| 564 | { | ||
| 565 | struct inet_peer *p = container_of(head, struct inet_peer, gc_rcu); | ||
| 566 | |||
| 567 | spin_lock_bh(&gc_lock); | ||
| 568 | list_add_tail(&p->gc_list, &gc_list); | ||
| 569 | spin_unlock_bh(&gc_lock); | ||
| 570 | |||
| 571 | schedule_delayed_work(&gc_work, gc_delay); | ||
| 572 | } | ||
| 573 | |||
| 563 | void inetpeer_invalidate_tree(int family) | 574 | void inetpeer_invalidate_tree(int family) |
| 564 | { | 575 | { |
| 565 | struct inet_peer *old, *new, *prev; | 576 | struct inet_peer *old, *new, *prev; |
| @@ -576,10 +587,7 @@ void inetpeer_invalidate_tree(int family) | |||
| 576 | prev = cmpxchg(&base->root, old, new); | 587 | prev = cmpxchg(&base->root, old, new); |
| 577 | if (prev == old) { | 588 | if (prev == old) { |
| 578 | base->total = 0; | 589 | base->total = 0; |
| 579 | spin_lock(&gc_lock); | 590 | call_rcu(&prev->gc_rcu, inetpeer_inval_rcu); |
| 580 | list_add_tail(&prev->gc_list, &gc_list); | ||
| 581 | spin_unlock(&gc_lock); | ||
| 582 | schedule_delayed_work(&gc_work, gc_delay); | ||
| 583 | } | 591 | } |
| 584 | 592 | ||
| 585 | out: | 593 | out: |
