diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/socket.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 361dc342f377..9c834fc30112 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c | |||
@@ -565,15 +565,15 @@ static int send_packet(struct kiocb *iocb, struct socket *sock, | |||
565 | return -ERESTARTSYS; | 565 | return -ERESTARTSYS; |
566 | } | 566 | } |
567 | 567 | ||
568 | if (unlikely(sock->state != SS_CONNECTED)) { | ||
569 | if (sock->state == SS_DISCONNECTING) | ||
570 | res = -EPIPE; | ||
571 | else | ||
572 | res = -ENOTCONN; | ||
573 | goto exit; | ||
574 | } | ||
575 | |||
576 | do { | 568 | do { |
569 | if (unlikely(sock->state != SS_CONNECTED)) { | ||
570 | if (sock->state == SS_DISCONNECTING) | ||
571 | res = -EPIPE; | ||
572 | else | ||
573 | res = -ENOTCONN; | ||
574 | goto exit; | ||
575 | } | ||
576 | |||
577 | res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov); | 577 | res = tipc_send(tsock->p->ref, m->msg_iovlen, m->msg_iov); |
578 | if (likely(res != -ELINKCONG)) { | 578 | if (likely(res != -ELINKCONG)) { |
579 | exit: | 579 | exit: |