aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_diag.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-08-09 23:08:09 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:41:49 -0400
commitf3f05f7046e7c85b04af390d95a82a27160dd5d0 (patch)
tree9a4a552c030ea8b2428ceee75311d73a6b339255 /net/ipv4/tcp_diag.c
parent6e04e02165a7209a71db553b7bc48d68421e5ebf (diff)
[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 0ae738b455f..1a89a03c449 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)
589 if (cb->args[0] == 0) { 589 if (cb->args[0] == 0) {
590 if (!(r->tcpdiag_states&(TCPF_LISTEN|TCPF_SYN_RECV))) 590 if (!(r->tcpdiag_states&(TCPF_LISTEN|TCPF_SYN_RECV)))
591 goto skip_listen_ht; 591 goto skip_listen_ht;
592 tcp_listen_lock(); 592 inet_listen_lock(&tcp_hashinfo);
593 for (i = s_i; i < INET_LHTABLE_SIZE; i++) { 593 for (i = s_i; i < INET_LHTABLE_SIZE; i++) {
594 struct sock *sk; 594 struct sock *sk;
595 struct hlist_node *node; 595 struct hlist_node *node;
@@ -613,7 +613,7 @@ static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb)
613 goto syn_recv; 613 goto syn_recv;
614 614
615 if (tcpdiag_dump_sock(skb, sk, cb) < 0) { 615 if (tcpdiag_dump_sock(skb, sk, cb) < 0) {
616 tcp_listen_unlock(); 616 inet_listen_unlock(&tcp_hashinfo);
617 goto done; 617 goto done;
618 } 618 }
619 619
@@ -622,7 +622,7 @@ syn_recv:
622 goto next_listen; 622 goto next_listen;
623 623
624 if (tcpdiag_dump_reqs(skb, sk, cb) < 0) { 624 if (tcpdiag_dump_reqs(skb, sk, cb) < 0) {
625 tcp_listen_unlock(); 625 inet_listen_unlock(&tcp_hashinfo);
626 goto done; 626 goto done;
627 } 627 }
628 628
@@ -636,7 +636,7 @@ next_listen:
636 cb->args[3] = 0; 636 cb->args[3] = 0;
637 cb->args[4] = 0; 637 cb->args[4] = 0;
638 } 638 }
639 tcp_listen_unlock(); 639 inet_listen_unlock(&tcp_hashinfo);
640skip_listen_ht: 640skip_listen_ht:
641 cb->args[0] = 1; 641 cb->args[0] = 1;
642 s_i = num = s_num = 0; 642 s_i = num = s_num = 0;