diff options
Diffstat (limited to 'net/tipc/socket.c')
| -rw-r--r-- | net/tipc/socket.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index aab4948f0aff..0ed0eaa62f29 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
| @@ -70,8 +70,6 @@ static const struct proto_ops msg_ops; | |||
| 70 | static struct proto tipc_proto; | 70 | static struct proto tipc_proto; |
| 71 | static struct proto tipc_proto_kern; | 71 | static struct proto tipc_proto_kern; |
| 72 | 72 | ||
| 73 | static int sockets_enabled; | ||
| 74 | |||
| 75 | /* | 73 | /* |
| 76 | * Revised TIPC socket locking policy: | 74 | * Revised TIPC socket locking policy: |
| 77 | * | 75 | * |
| @@ -999,7 +997,7 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long timeo) | |||
| 999 | 997 | ||
| 1000 | for (;;) { | 998 | for (;;) { |
| 1001 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); | 999 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
| 1002 | if (skb_queue_empty(&sk->sk_receive_queue)) { | 1000 | if (timeo && skb_queue_empty(&sk->sk_receive_queue)) { |
| 1003 | if (sock->state == SS_DISCONNECTING) { | 1001 | if (sock->state == SS_DISCONNECTING) { |
| 1004 | err = -ENOTCONN; | 1002 | err = -ENOTCONN; |
| 1005 | break; | 1003 | break; |
| @@ -1625,7 +1623,7 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo) | |||
| 1625 | for (;;) { | 1623 | for (;;) { |
| 1626 | prepare_to_wait_exclusive(sk_sleep(sk), &wait, | 1624 | prepare_to_wait_exclusive(sk_sleep(sk), &wait, |
| 1627 | TASK_INTERRUPTIBLE); | 1625 | TASK_INTERRUPTIBLE); |
| 1628 | if (skb_queue_empty(&sk->sk_receive_queue)) { | 1626 | if (timeo && skb_queue_empty(&sk->sk_receive_queue)) { |
| 1629 | release_sock(sk); | 1627 | release_sock(sk); |
| 1630 | timeo = schedule_timeout(timeo); | 1628 | timeo = schedule_timeout(timeo); |
| 1631 | lock_sock(sk); | 1629 | lock_sock(sk); |
| @@ -2027,8 +2025,6 @@ int tipc_socket_init(void) | |||
| 2027 | proto_unregister(&tipc_proto); | 2025 | proto_unregister(&tipc_proto); |
| 2028 | goto out; | 2026 | goto out; |
| 2029 | } | 2027 | } |
| 2030 | |||
| 2031 | sockets_enabled = 1; | ||
| 2032 | out: | 2028 | out: |
| 2033 | return res; | 2029 | return res; |
| 2034 | } | 2030 | } |
| @@ -2038,10 +2034,6 @@ int tipc_socket_init(void) | |||
| 2038 | */ | 2034 | */ |
| 2039 | void tipc_socket_stop(void) | 2035 | void tipc_socket_stop(void) |
| 2040 | { | 2036 | { |
| 2041 | if (!sockets_enabled) | ||
| 2042 | return; | ||
| 2043 | |||
| 2044 | sockets_enabled = 0; | ||
| 2045 | sock_unregister(tipc_family_ops.family); | 2037 | sock_unregister(tipc_family_ops.family); |
| 2046 | proto_unregister(&tipc_proto); | 2038 | proto_unregister(&tipc_proto); |
| 2047 | } | 2039 | } |
