diff options
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r-- | net/rds/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index 14f041398ca1..60f0cd6ed15f 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
@@ -126,7 +126,10 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr, | |||
126 | struct rds_transport *loop_trans; | 126 | struct rds_transport *loop_trans; |
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int ret; | 128 | int ret; |
129 | struct rds_transport *otrans = trans; | ||
129 | 130 | ||
131 | if (!is_outgoing && otrans->t_type == RDS_TRANS_TCP) | ||
132 | goto new_conn; | ||
130 | rcu_read_lock(); | 133 | rcu_read_lock(); |
131 | conn = rds_conn_lookup(head, laddr, faddr, trans); | 134 | conn = rds_conn_lookup(head, laddr, faddr, trans); |
132 | if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport && | 135 | if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport && |
@@ -142,6 +145,7 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr, | |||
142 | if (conn) | 145 | if (conn) |
143 | goto out; | 146 | goto out; |
144 | 147 | ||
148 | new_conn: | ||
145 | conn = kmem_cache_zalloc(rds_conn_slab, gfp); | 149 | conn = kmem_cache_zalloc(rds_conn_slab, gfp); |
146 | if (!conn) { | 150 | if (!conn) { |
147 | conn = ERR_PTR(-ENOMEM); | 151 | conn = ERR_PTR(-ENOMEM); |