aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/iser/iscsi_iser.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/iser/iscsi_iser.c')
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 08edbaf8922..c02eabd383a 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -281,9 +281,6 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
281 conn->max_recv_dlength = 128; 281 conn->max_recv_dlength = 128;
282 282
283 iser_conn = conn->dd_data; 283 iser_conn = conn->dd_data;
284 /* currently this is the only field which need to be initiated */
285 rwlock_init(&iser_conn->lock);
286
287 conn->dd_data = iser_conn; 284 conn->dd_data = iser_conn;
288 iser_conn->iscsi_conn = conn; 285 iser_conn->iscsi_conn = conn;
289 286
@@ -342,9 +339,6 @@ iscsi_iser_conn_bind(struct iscsi_cls_session *cls_session,
342 ib_conn->iser_conn = iser_conn; 339 ib_conn->iser_conn = iser_conn;
343 iser_conn->ib_conn = ib_conn; 340 iser_conn->ib_conn = ib_conn;
344 iser_conn_get(ib_conn); 341 iser_conn_get(ib_conn);
345
346 conn->recv_lock = &iser_conn->lock;
347
348 return 0; 342 return 0;
349} 343}
350 344
@@ -355,12 +349,18 @@ iscsi_iser_conn_stop(struct iscsi_cls_conn *cls_conn, int flag)
355 struct iscsi_iser_conn *iser_conn = conn->dd_data; 349 struct iscsi_iser_conn *iser_conn = conn->dd_data;
356 struct iser_conn *ib_conn = iser_conn->ib_conn; 350 struct iser_conn *ib_conn = iser_conn->ib_conn;
357 351
358 iscsi_conn_stop(cls_conn, flag);
359 /* 352 /*
360 * There is no unbind event so the stop callback 353 * Userspace may have goofed up and not bound the connection or
361 * must release the ref from the bind. 354 * might have only partially setup the connection.
362 */ 355 */
363 iser_conn_put(ib_conn); 356 if (ib_conn) {
357 iscsi_conn_stop(cls_conn, flag);
358 /*
359 * There is no unbind event so the stop callback
360 * must release the ref from the bind.
361 */
362 iser_conn_put(ib_conn);
363 }
364 iser_conn->ib_conn = NULL; 364 iser_conn->ib_conn = NULL;
365} 365}
366 366