]> git.baikalelectronics.ru Git - kernel.git/commit
net: udp_unhash() can test if sk is hashed
authorEric Dumazet <dada1@cosmosbay.com>
Tue, 25 Nov 2008 21:55:15 +0000 (13:55 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2008 21:55:15 +0000 (13:55 -0800)
commite9ac82170a5f9bc8dfef2f1ee1872a2863bceceb
treef33c3d2b0e4f204a6b3f97ed198e1431a10ca448
parent294eaf0e91585dbc731424f270ad3a2bbd23c124
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