Skip to content

Commit dac9201

Browse files
authored
Merge pull request #1770 from hjelmn/rdma_wth
btl/openib: fix rdmacm
2 parents 6cd5d5c + 17ae1ac commit dac9201

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

opal/mca/btl/openib/connect/btl_openib_connect_rdmacm.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -886,13 +886,11 @@ static int rdmacm_module_start_connect(opal_btl_openib_connect_base_module_t *cp
886886
return OPAL_SUCCESS;
887887

888888
out:
889-
for (item = opal_list_remove_first(&(contents->ids));
890-
NULL != item;
891-
item = opal_list_remove_first(&(contents->ids))) {
889+
while (NULL != (item = opal_list_remove_first (&contents->ids))) {
892890
OBJ_RELEASE(item);
893-
}
891+
}
894892

895-
return rc;
893+
return rc;
896894
}
897895

898896
#if !BTL_OPENIB_RDMACM_IB_ADDR
@@ -1136,7 +1134,7 @@ static void *call_disconnect_callback(int fd, int flags, void *v)
11361134
{
11371135
rdmacm_contents_t *contents = (rdmacm_contents_t *) v;
11381136
void *tmp = NULL;
1139-
id_context_t *context = (id_context_t*) v;
1137+
id_context_t *context;
11401138
opal_list_item_t *item;
11411139

11421140
pthread_mutex_lock (&rdmacm_disconnect_lock);
@@ -1325,12 +1323,10 @@ static int rdmacm_disconnected(id_context_t *context)
13251323
/* If this was a client thread, then it *may* still be listed in a
13261324
contents->ids list. */
13271325

1328-
context->already_disconnected = true;
1329-
if (NULL != context) {
1330-
OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p",
1331-
(void*) context, (void*) context->id));
1332-
OBJ_RELEASE(context);
1333-
}
1326+
OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p",
1327+
(void*) context, (void*) context->id));
1328+
OBJ_RELEASE(context);
1329+
13341330
return OPAL_SUCCESS;
13351331
}
13361332

0 commit comments

Comments
 (0)