]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
RDS: TCP: Refactor connection destruction to handle multiple paths
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 30 Jun 2016 23:11:13 +0000 (16:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 20:45:17 +0000 (16:45 -0400)
commitafb4164d91c7486a1d4ab098a1b88e27b5e25772
tree9d1b76c3268d9c491fc9280237b62f7fb7a49892
parent02105b2ccdd6344146e0296172a9e0f17ff624ef
RDS: TCP: Refactor connection destruction to handle multiple paths

A single rds_connection may have multiple rds_conn_paths that have
to be carefully and correctly destroyed, for both rmmod and
netns-delete cases.

For both cases, we extract a single rds_tcp_connection for
each conn into a temporary list, and then invoke rds_conn_destroy()
which iteratively dismantles every path in the rds_connection.

For the netns deletion case, we additionally have to make sure
that we do not leave a socket in TIME_WAIT state, as this will
hold up the netns deletion. Thus we call rds_tcp_conn_paths_destroy()
to reset state quickly.

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