summaryrefslogtreecommitdiff
path: root/net/rds/tcp_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/tcp_connect.c')
-rw-r--r--net/rds/tcp_connect.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
index c916715fbe61..05f61c533ed3 100644
--- a/net/rds/tcp_connect.c
+++ b/net/rds/tcp_connect.c
@@ -34,7 +34,6 @@
#include <linux/in.h>
#include <net/tcp.h>
-#include "rds_single_path.h"
#include "rds.h"
#include "tcp.h"
@@ -82,6 +81,12 @@ int rds_tcp_conn_path_connect(struct rds_conn_path *cp)
struct rds_connection *conn = cp->cp_conn;
struct rds_tcp_connection *tc = cp->cp_transport_data;
+ /* for multipath rds,we only trigger the connection after
+ * the handshake probe has determined the number of paths.
+ */
+ if (cp->cp_index > 0 && cp->cp_conn->c_npaths < 2)
+ return -EAGAIN;
+
mutex_lock(&tc->t_conn_path_lock);
if (rds_conn_path_up(cp)) {