]> git.baikalelectronics.ru Git - kernel.git/commitdiff
RDS: TCP: Retransmit half-sent datagrams when switching sockets in rds_tcp_reset_call...
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Sat, 4 Jun 2016 20:59:59 +0000 (13:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 22:10:15 +0000 (15:10 -0700)
When we switch a connection's sockets in rds_tcp_rest_callbacks,
any partially sent datagram must be retransmitted on the new
socket so that the receiver can correctly reassmble the RDS
datagram. Use rds_send_reset() which is designed for this purpose.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/send.c
net/rds/tcp.c

index c9cdb358ea885e3e356cc675b579f1313ed94ff9..b1962f8e30f7bfc9fa77fb9bb413c42c81018e57 100644 (file)
@@ -99,6 +99,7 @@ void rds_send_reset(struct rds_connection *conn)
        list_splice_init(&conn->c_retrans, &conn->c_send_queue);
        spin_unlock_irqrestore(&conn->c_lock, flags);
 }
+EXPORT_SYMBOL_GPL(rds_send_reset);
 
 static int acquire_in_xmit(struct rds_connection *conn)
 {
index 8faa0b1ae39dd8bbd2f5fe44610ae1ebe4d1c64c..7ab1b41ffc88aa5586b2fa6321477a6be4f44904 100644 (file)
@@ -173,6 +173,7 @@ void rds_tcp_reset_callbacks(struct socket *sock,
        release_sock(osock->sk);
        sock_release(osock);
 newsock:
+       rds_send_reset(conn);
        lock_sock(sock->sk);
        write_lock_bh(&sock->sk->sk_callback_lock);
        tc->t_sock = sock;