diff options
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r-- | net/rds/connection.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index da6da57e5f36..d4fecb21ca25 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c | |||
@@ -117,7 +117,8 @@ static void rds_conn_reset(struct rds_connection *conn) | |||
117 | * For now they are not garbage collected once they're created. They | 117 | * For now they are not garbage collected once they're created. They |
118 | * are torn down as the module is removed, if ever. | 118 | * are torn down as the module is removed, if ever. |
119 | */ | 119 | */ |
120 | static struct rds_connection *__rds_conn_create(__be32 laddr, __be32 faddr, | 120 | static struct rds_connection *__rds_conn_create(struct net *net, |
121 | __be32 laddr, __be32 faddr, | ||
121 | struct rds_transport *trans, gfp_t gfp, | 122 | struct rds_transport *trans, gfp_t gfp, |
122 | int is_outgoing) | 123 | int is_outgoing) |
123 | { | 124 | { |
@@ -157,6 +158,7 @@ new_conn: | |||
157 | conn->c_faddr = faddr; | 158 | conn->c_faddr = faddr; |
158 | spin_lock_init(&conn->c_lock); | 159 | spin_lock_init(&conn->c_lock); |
159 | conn->c_next_tx_seq = 1; | 160 | conn->c_next_tx_seq = 1; |
161 | rds_conn_net_set(conn, net); | ||
160 | 162 | ||
161 | init_waitqueue_head(&conn->c_waitq); | 163 | init_waitqueue_head(&conn->c_waitq); |
162 | INIT_LIST_HEAD(&conn->c_send_queue); | 164 | INIT_LIST_HEAD(&conn->c_send_queue); |
@@ -174,7 +176,7 @@ new_conn: | |||
174 | * can bind to the destination address then we'd rather the messages | 176 | * can bind to the destination address then we'd rather the messages |
175 | * flow through loopback rather than either transport. | 177 | * flow through loopback rather than either transport. |
176 | */ | 178 | */ |
177 | loop_trans = rds_trans_get_preferred(faddr); | 179 | loop_trans = rds_trans_get_preferred(net, faddr); |
178 | if (loop_trans) { | 180 | if (loop_trans) { |
179 | rds_trans_put(loop_trans); | 181 | rds_trans_put(loop_trans); |
180 | conn->c_loopback = 1; | 182 | conn->c_loopback = 1; |
@@ -260,17 +262,19 @@ out: | |||
260 | return conn; | 262 | return conn; |
261 | } | 263 | } |
262 | 264 | ||
263 | struct rds_connection *rds_conn_create(__be32 laddr, __be32 faddr, | 265 | struct rds_connection *rds_conn_create(struct net *net, |
266 | __be32 laddr, __be32 faddr, | ||
264 | struct rds_transport *trans, gfp_t gfp) | 267 | struct rds_transport *trans, gfp_t gfp) |
265 | { | 268 | { |
266 | return __rds_conn_create(laddr, faddr, trans, gfp, 0); | 269 | return __rds_conn_create(net, laddr, faddr, trans, gfp, 0); |
267 | } | 270 | } |
268 | EXPORT_SYMBOL_GPL(rds_conn_create); | 271 | EXPORT_SYMBOL_GPL(rds_conn_create); |
269 | 272 | ||
270 | struct rds_connection *rds_conn_create_outgoing(__be32 laddr, __be32 faddr, | 273 | struct rds_connection *rds_conn_create_outgoing(struct net *net, |
274 | __be32 laddr, __be32 faddr, | ||
271 | struct rds_transport *trans, gfp_t gfp) | 275 | struct rds_transport *trans, gfp_t gfp) |
272 | { | 276 | { |
273 | return __rds_conn_create(laddr, faddr, trans, gfp, 1); | 277 | return __rds_conn_create(net, laddr, faddr, trans, gfp, 1); |
274 | } | 278 | } |
275 | EXPORT_SYMBOL_GPL(rds_conn_create_outgoing); | 279 | EXPORT_SYMBOL_GPL(rds_conn_create_outgoing); |
276 | 280 | ||