Commit d4f4b915 authored by David S. Miller's avatar David S. Miller

Merge branch 'rds-minor-bug-fixes'

Sowmini Varadhan says:

====================
rds: tcp: couple of minor bug fixes

A couple of minor bugfixes that showed up during testing
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d3fbff30 087d9753
...@@ -333,11 +333,19 @@ void rds_conn_shutdown(struct rds_conn_path *cp) ...@@ -333,11 +333,19 @@ void rds_conn_shutdown(struct rds_conn_path *cp)
rds_conn_path_reset(cp); rds_conn_path_reset(cp);
if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING, if (!rds_conn_path_transition(cp, RDS_CONN_DISCONNECTING,
RDS_CONN_DOWN) &&
!rds_conn_path_transition(cp, RDS_CONN_ERROR,
RDS_CONN_DOWN)) { RDS_CONN_DOWN)) {
/* This can happen - eg when we're in the middle of tearing /* This can happen - eg when we're in the middle of tearing
* down the connection, and someone unloads the rds module. * down the connection, and someone unloads the rds module.
* Quite reproduceable with loopback connections. * Quite reproducible with loopback connections.
* Mostly harmless. * Mostly harmless.
*
* Note that this also happens with rds-tcp because
* we could have triggered rds_conn_path_drop in irq
* mode from rds_tcp_state change on the receipt of
* a FIN, thus we need to recheck for RDS_CONN_ERROR
* here.
*/ */
rds_conn_path_error(cp, "%s: failed to transition " rds_conn_path_error(cp, "%s: failed to transition "
"to state DOWN, current state " "to state DOWN, current state "
......
...@@ -156,7 +156,7 @@ void rds_connect_worker(struct work_struct *work) ...@@ -156,7 +156,7 @@ void rds_connect_worker(struct work_struct *work)
struct rds_connection *conn = cp->cp_conn; struct rds_connection *conn = cp->cp_conn;
int ret; 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; return;
clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags); clear_bit(RDS_RECONNECT_PENDING, &cp->cp_flags);
ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING); ret = rds_conn_path_transition(cp, RDS_CONN_DOWN, RDS_CONN_CONNECTING);
......
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