summaryrefslogtreecommitdiffstats
path: root/net/rds/connection.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2016-06-13 12:44:37 -0400
committerDavid S. Miller <davem@davemloft.net>2016-06-15 02:50:43 -0400
commit3c0a59001a416ec2a1c46576917732fe5b99336b (patch)
treee816122f4522a8be74e18fc68b6ea662c3ac1de4 /net/rds/connection.c
parent45997e9e2e01d76607d70461414f66f51487bfe5 (diff)
RDS: Add rds_conn_path_connect_if_down() for MP-aware callers
rds_conn_path_connect_if_down() works on the rds_conn_path that it is passed. Callers who are not t_m_capable may continue calling rds_conn_connect_if_down, which will invoke rds_conn_path_connect_if_down() with the default c_path[0]. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r--net/rds/connection.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 6fa2074044b9..953a426b25ab 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -572,11 +572,17 @@ EXPORT_SYMBOL_GPL(rds_conn_drop);
572 * If the connection is down, trigger a connect. We may have scheduled a 572 * If the connection is down, trigger a connect. We may have scheduled a
573 * delayed reconnect however - in this case we should not interfere. 573 * delayed reconnect however - in this case we should not interfere.
574 */ 574 */
575void rds_conn_path_connect_if_down(struct rds_conn_path *cp)
576{
577 if (rds_conn_path_state(cp) == RDS_CONN_DOWN &&
578 !test_and_set_bit(RDS_RECONNECT_PENDING, &cp->cp_flags))
579 queue_delayed_work(rds_wq, &cp->cp_conn_w, 0);
580}
581
575void rds_conn_connect_if_down(struct rds_connection *conn) 582void rds_conn_connect_if_down(struct rds_connection *conn)
576{ 583{
577 if (rds_conn_state(conn) == RDS_CONN_DOWN && 584 WARN_ON(conn->c_trans->t_mp_capable);
578 !test_and_set_bit(RDS_RECONNECT_PENDING, &conn->c_flags)) 585 rds_conn_path_connect_if_down(&conn->c_path[0]);
579 queue_delayed_work(rds_wq, &conn->c_conn_w, 0);
580} 586}
581EXPORT_SYMBOL_GPL(rds_conn_connect_if_down); 587EXPORT_SYMBOL_GPL(rds_conn_connect_if_down);
582 588