1
1

Merge pull request #1770 from hjelmn/rdma_wth

btl/openib: fix rdmacm
Этот коммит содержится в:
Nathan Hjelm 2016-06-24 22:46:53 -06:00 коммит произвёл GitHub
родитель 6cd5d5c0f9 17ae1aceeb
Коммит dac9201f3b

Просмотреть файл

@ -886,9 +886,7 @@ static int rdmacm_module_start_connect(opal_btl_openib_connect_base_module_t *cp
return OPAL_SUCCESS; return OPAL_SUCCESS;
out: out:
for (item = opal_list_remove_first(&(contents->ids)); while (NULL != (item = opal_list_remove_first (&contents->ids))) {
NULL != item;
item = opal_list_remove_first(&(contents->ids))) {
OBJ_RELEASE(item); OBJ_RELEASE(item);
} }
@ -1136,7 +1134,7 @@ static void *call_disconnect_callback(int fd, int flags, void *v)
{ {
rdmacm_contents_t *contents = (rdmacm_contents_t *) v; rdmacm_contents_t *contents = (rdmacm_contents_t *) v;
void *tmp = NULL; void *tmp = NULL;
id_context_t *context = (id_context_t*) v; id_context_t *context;
opal_list_item_t *item; opal_list_item_t *item;
pthread_mutex_lock (&rdmacm_disconnect_lock); pthread_mutex_lock (&rdmacm_disconnect_lock);
@ -1325,12 +1323,10 @@ static int rdmacm_disconnected(id_context_t *context)
/* If this was a client thread, then it *may* still be listed in a /* If this was a client thread, then it *may* still be listed in a
contents->ids list. */ contents->ids list. */
context->already_disconnected = true;
if (NULL != context) {
OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p", OPAL_OUTPUT((-1, "SERVICE Releasing context because of DISCONNECT: context %p, id %p",
(void*) context, (void*) context->id)); (void*) context, (void*) context->id));
OBJ_RELEASE(context); OBJ_RELEASE(context);
}
return OPAL_SUCCESS; return OPAL_SUCCESS;
} }