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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c
index cc8b568c0c84..7619b671ca28 100644
--- a/net/rds/connection.c
+++ b/net/rds/connection.c
@@ -32,6 +32,7 @@
32 */ 32 */
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/list.h> 34#include <linux/list.h>
35#include <linux/slab.h>
35#include <net/inet_hashtables.h> 36#include <net/inet_hashtables.h>
36 37
37#include "rds.h" 38#include "rds.h"
@@ -133,10 +134,8 @@ static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr,
133 134
134 spin_lock_irqsave(&rds_conn_lock, flags); 135 spin_lock_irqsave(&rds_conn_lock, flags);
135 conn = rds_conn_lookup(head, laddr, faddr, trans); 136 conn = rds_conn_lookup(head, laddr, faddr, trans);
136 if (conn 137 if (conn && conn->c_loopback && conn->c_trans != &rds_loop_transport &&
137 && conn->c_loopback 138 !is_outgoing) {
138 && conn->c_trans != &rds_loop_transport
139 && !is_outgoing) {
140 /* This is a looped back IB connection, and we're 139 /* This is a looped back IB connection, and we're
141 * called by the code handling the incoming connect. 140 * called by the code handling the incoming connect.
142 * We need a second connection object into which we 141 * We need a second connection object into which we