Skip to content

Commit e47c44f

Browse files
RDS: don't modify conn state directly in rds_connect_complete
Avoid modifying the conn state directly and let the APIs handle it to be consistent across. Orabug: 22347191 Tested-by: Michael Nowak <[email protected]> Tested-by: Rafael Alejandro Peralez <[email protected]> Tested-by: Liwen Huang <[email protected]> Tested-by: Hong Liu <[email protected]> Reviewed-by: Mukesh Kacker <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]>
1 parent 49d10bb commit e47c44f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

net/rds/threads.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,10 @@ EXPORT_SYMBOL_GPL(rds_local_wq);
8080
void rds_connect_path_complete(struct rds_connection *conn, int curr)
8181
{
8282
if (!rds_conn_transition(conn, curr, RDS_CONN_UP)) {
83-
printk(KERN_WARNING "%s: Cannot transition to state UP"
84-
", current state is %d\n",
85-
__func__,
86-
atomic_read(&conn->c_state));
87-
atomic_set(&conn->c_state, RDS_CONN_ERROR);
88-
queue_work(conn->c_wq, &conn->c_down_w);
83+
pr_warn("RDS: Cannot transition conn <%pI4,%pI4,%d> to state UP, current state is %d\n",
84+
&conn->c_laddr, &conn->c_faddr, conn->c_tos,
85+
atomic_read(&conn->c_state));
86+
rds_conn_drop(conn, DR_IB_NOT_CONNECTING_STATE);
8987
return;
9088
}
9189

0 commit comments

Comments
 (0)