]> git.baikalelectronics.ru Git - 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)
commit19779303d559ab286bd194c303689d4226064aad
tree9d1b76c3268d9c491fc9280237b62f7fb7a49892
parent0f07569cc0ef05f5942dc538440bf38086fd7d82
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