Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122151
b: refs/heads/master
c: 723b461
h: refs/heads/master
i:
  122149: ef87780
  122147: 4cdd71e
  122143: a3e2a6b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 25, 2008
1 parent d283665 commit e3f1718
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060
refs/heads/master: 723b46108f8ee75b61ce703d0c9225e4f537bc46
18 changes: 10 additions & 8 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,16 +970,18 @@ int udp_disconnect(struct sock *sk, int flags)

void udp_lib_unhash(struct sock *sk)
{
struct udp_table *udptable = sk->sk_prot->h.udp_table;
unsigned int hash = udp_hashfn(sock_net(sk), sk->sk_hash);
struct udp_hslot *hslot = &udptable->hash[hash];
if (sk_hashed(sk)) {
struct udp_table *udptable = sk->sk_prot->h.udp_table;
unsigned int hash = udp_hashfn(sock_net(sk), sk->sk_hash);
struct udp_hslot *hslot = &udptable->hash[hash];

spin_lock_bh(&hslot->lock);
if (sk_nulls_del_node_init_rcu(sk)) {
inet_sk(sk)->num = 0;
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
spin_lock_bh(&hslot->lock);
if (sk_nulls_del_node_init_rcu(sk)) {
inet_sk(sk)->num = 0;
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
}
spin_unlock_bh(&hslot->lock);
}
spin_unlock_bh(&hslot->lock);
}
EXPORT_SYMBOL(udp_lib_unhash);

Expand Down

0 comments on commit e3f1718

Please sign in to comment.