summaryrefslogtreecommitdiffstats
path: root/net/rds/threads.c
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2017-04-01 00:56:31 +0200
committerDavid S. Miller <davem@davemloft.net>2017-04-03 04:41:00 +0200
commit087d975353d0cc9b7536d6ef46cd9303fceb2e17 (patch)
treea8e64d94e8f4452c60969b63c6471ffd219d42c0 /net/rds/threads.c
parentrds: tcp: allow progress of rds_conn_shutdown if the rds_connection is marked... (diff)
downloadlinux-087d975353d0cc9b7536d6ef46cd9303fceb2e17.tar.xz
linux-087d975353d0cc9b7536d6ef46cd9303fceb2e17.zip
rds: tcp: canonical connection order for all paths with index > 0
The rds_connect_worker() has a bug in the check that enforces the canonical connection order described in the comments of rds_tcp_state_change(). The intention is to make sure that all the multipath connections are always initiated by the smaller IP address via rds_start_mprds. To achieve this, rds_connection_worker should check that cp_index > 0. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/threads.c')
-rw-r--r--net/rds/threads.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/threads.c b/net/rds/threads.c
index e36e333a0aa0..3e447d056d09 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -156,7 +156,7 @@ void rds_connect_worker(struct work_struct *work)
struct rds_connection *conn = cp->cp_conn;
int ret;
- if (cp->cp_index > 1 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
+ if (cp->cp_index > 0 && cp->cp_conn->c_laddr > cp->cp_conn->c_faddr)
return;
clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags);
ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING);