net: udp_unhash() can test if sk is hashed
commit723b46108f8ee75b61ce703d0c9225e4f537bc46
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 25 Nov 2008 21:55:15 +0000 (25 13:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2008 21:55:15 +0000 (25 13:55 -0800)
treef33c3d2b0e4f204a6b3f97ed198e1431a10ca448
parent5bc0b3bfa758e4ae49c94e31c1edb9a5f10a8060
net: udp_unhash() can test if sk is hashed

Impact: Optimization

Like done in inet_unhash(), we can avoid taking a chain lock if
socket is not hashed in udp_unhash()

Triggered by close(socket(AF_INET, SOCK_DGRAM, 0));

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c