diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index a4cf274455aa..0ed0eaa62f29 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -997,7 +997,7 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long timeo) | |||
997 | 997 | ||
998 | for (;;) { | 998 | for (;;) { |
999 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); | 999 | prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); |
1000 | if (skb_queue_empty(&sk->sk_receive_queue)) { | 1000 | if (timeo && skb_queue_empty(&sk->sk_receive_queue)) { |
1001 | if (sock->state == SS_DISCONNECTING) { | 1001 | if (sock->state == SS_DISCONNECTING) { |
1002 | err = -ENOTCONN; | 1002 | err = -ENOTCONN; |
1003 | break; | 1003 | break; |
@@ -1623,7 +1623,7 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo) | |||
1623 | for (;;) { | 1623 | for (;;) { |
1624 | prepare_to_wait_exclusive(sk_sleep(sk), &wait, | 1624 | prepare_to_wait_exclusive(sk_sleep(sk), &wait, |
1625 | TASK_INTERRUPTIBLE); | 1625 | TASK_INTERRUPTIBLE); |
1626 | if (skb_queue_empty(&sk->sk_receive_queue)) { | 1626 | if (timeo && skb_queue_empty(&sk->sk_receive_queue)) { |
1627 | release_sock(sk); | 1627 | release_sock(sk); |
1628 | timeo = schedule_timeout(timeo); | 1628 | timeo = schedule_timeout(timeo); |
1629 | lock_sock(sk); | 1629 | lock_sock(sk); |