aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r--net/rds/connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index 75a1a37d64d..968b7a79839 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -117,6 +117,7 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
117{ 117{
118 struct rds_connection *conn, *parent = NULL; 118 struct rds_connection *conn, *parent = NULL;
119 struct hlist_head *head = rds_conn_bucket(laddr, faddr); 119 struct hlist_head *head = rds_conn_bucket(laddr, faddr);
120 struct rds_transport *loop_trans;
120 unsigned long flags; 121 unsigned long flags;
121 int ret; 122 int ret;
122 123
@@ -163,7 +164,9 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
163 * can bind to the destination address then we'd rather the messages 164 * can bind to the destination address then we'd rather the messages
164 * flow through loopback rather than either transport. 165 * flow through loopback rather than either transport.
165 */ 166 */
166 if (rds_trans_get_preferred(faddr)) { 167 loop_trans = rds_trans_get_preferred(faddr);
168 if (loop_trans) {
169 rds_trans_put(loop_trans);
167 conn->c_loopback = 1; 170 conn->c_loopback = 1;
168 if (is_outgoing && trans->t_prefer_loopback) { 171 if (is_outgoing && trans->t_prefer_loopback) {
169 /* "outgoing" connection - and the transport 172 /* "outgoing" connection - and the transport