summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-10 07:08:09 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-30 02:41:49 +0400
commitf3f05f7046e7c85b04af390d95a82a27160dd5d0 (patch)
tree9a4a552c030ea8b2428ceee75311d73a6b339255 /net/ipv4/tcp_diag.c
parent6e04e02165a7209a71db553b7bc48d68421e5ebf (diff)
downloadlinux-f3f05f7046e7c85b04af390d95a82a27160dd5d0.tar.xz
[INET]: Generalise the tcp_listen_ lock routines
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_diag.c')
-rw-r--r--net/ipv4/tcp_diag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index 0ae738b455f0..1a89a03c449b 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -589,7 +589,7 @@ static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb)
if (cb->args[0] == 0) {
if (!(r->tcpdiag_states&(TCPF_LISTEN|TCPF_SYN_RECV)))
goto skip_listen_ht;
- tcp_listen_lock();
+ inet_listen_lock(&tcp_hashinfo);
for (i = s_i; i < INET_LHTABLE_SIZE; i++) {
struct sock *sk;
struct hlist_node *node;
@@ -613,7 +613,7 @@ static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb)
goto syn_recv;
if (tcpdiag_dump_sock(skb, sk, cb) < 0) {
- tcp_listen_unlock();
+ inet_listen_unlock(&tcp_hashinfo);
goto done;
}
@@ -622,7 +622,7 @@ syn_recv:
goto next_listen;
if (tcpdiag_dump_reqs(skb, sk, cb) < 0) {
- tcp_listen_unlock();
+ inet_listen_unlock(&tcp_hashinfo);
goto done;
}
@@ -636,7 +636,7 @@ next_listen:
cb->args[3] = 0;
cb->args[4] = 0;
}
- tcp_listen_unlock();
+ inet_listen_unlock(&tcp_hashinfo);
skip_listen_ht:
cb->args[0] = 1;
s_i = num = s_num = 0;