RDS: TCP: Make rds_tcp_connection track the rds_conn_path

The struct rds_tcp_connection is the transport-specific private
data structure that tracks TCP information per rds_conn_path.
Modify this structure to have a back-pointer to the rds_conn_path
for which it is the ->cp_transport_data.

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>
This commit is contained in:
Sowmini Varadhan
2016-06-30 16:11:12 -07:00
committed by David S. Miller
parent 26e4e6bb68
commit 02105b2ccd
5 changed files with 48 additions and 42 deletions

View File

@@ -82,10 +82,10 @@ int rds_tcp_conn_connect(struct rds_connection *conn)
int ret;
struct rds_tcp_connection *tc = conn->c_transport_data;
mutex_lock(&tc->t_conn_lock);
mutex_lock(&tc->t_conn_path_lock);
if (rds_conn_up(conn)) {
mutex_unlock(&tc->t_conn_lock);
mutex_unlock(&tc->t_conn_path_lock);
return 0;
}
ret = sock_create_kern(rds_conn_net(conn), PF_INET,
@@ -129,7 +129,7 @@ int rds_tcp_conn_connect(struct rds_connection *conn)
}
out:
mutex_unlock(&tc->t_conn_lock);
mutex_unlock(&tc->t_conn_path_lock);
if (sock)
sock_release(sock);
return ret;