]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: bind() optimize port allocation
authorFlavio Leitner <fbl@redhat.com>
Wed, 25 Jan 2012 08:34:52 +0000 (08:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jan 2012 02:50:43 +0000 (21:50 -0500)
commit79d41ede87953c6165e30d77278094df678fe6f4
treef995ec889ebc1edc3fc9d3b0fe1da1fe9c2d6b76
parent1fba14cb15f6e7ae01dc26379418f2e1b5a528e8
tcp: bind() optimize port allocation

Port autoselection finds a port and then drop the lock,
then right after that, gets the hash bucket again and lock it.

Fix it to go direct.

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c