Commit 2d746c93 authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

rds: tcp: remove redundant function rds_tcp_conn_paths_destroy()

A side-effect of Commit c14b0366 ("rds: tcp: set linger to 1
when unloading a rds-tcp") is that we always send a RST on the tcp
connection for rds_conn_destroy(), so rds_tcp_conn_paths_destroy()
is not needed any more and is removed in this patch.
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c94cc2d
...@@ -495,27 +495,6 @@ static struct pernet_operations rds_tcp_net_ops = { ...@@ -495,27 +495,6 @@ static struct pernet_operations rds_tcp_net_ops = {
.size = sizeof(struct rds_tcp_net), .size = sizeof(struct rds_tcp_net),
}; };
/* explicitly send a RST on each socket, thereby releasing any socket refcnts
* that may otherwise hold up netns deletion.
*/
static void rds_tcp_conn_paths_destroy(struct rds_connection *conn)
{
struct rds_conn_path *cp;
struct rds_tcp_connection *tc;
int i;
struct sock *sk;
for (i = 0; i < RDS_MPATH_WORKERS; i++) {
cp = &conn->c_path[i];
tc = cp->cp_transport_data;
if (!tc->t_sock)
continue;
sk = tc->t_sock->sk;
sk->sk_prot->disconnect(sk, 0);
tcp_done(sk);
}
}
static void rds_tcp_kill_sock(struct net *net) static void rds_tcp_kill_sock(struct net *net)
{ {
struct rds_tcp_connection *tc, *_tc; struct rds_tcp_connection *tc, *_tc;
...@@ -535,10 +514,8 @@ static void rds_tcp_kill_sock(struct net *net) ...@@ -535,10 +514,8 @@ static void rds_tcp_kill_sock(struct net *net)
list_move_tail(&tc->t_tcp_node, &tmp_list); list_move_tail(&tc->t_tcp_node, &tmp_list);
} }
spin_unlock_irq(&rds_tcp_conn_lock); spin_unlock_irq(&rds_tcp_conn_lock);
list_for_each_entry_safe(tc, _tc, &tmp_list, t_tcp_node) { list_for_each_entry_safe(tc, _tc, &tmp_list, t_tcp_node)
rds_tcp_conn_paths_destroy(tc->t_cpath->cp_conn);
rds_conn_destroy(tc->t_cpath->cp_conn); rds_conn_destroy(tc->t_cpath->cp_conn);
}
} }
void *rds_tcp_listen_sock_def_readable(struct net *net) void *rds_tcp_listen_sock_def_readable(struct net *net)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment