static inline int lnet_is_wire_handle_none (lnet_handle_wire_t *wh)
{
- return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_NONE.wh_interface_cookie &&
- wh->wh_object_cookie == LNET_WIRE_HANDLE_NONE.wh_object_cookie);
+ return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
+ wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
}
static inline int lnet_md_exhausted (lnet_libmd_t *md)
md = (lnet_libmd_t *)lnet_freelist_alloc(&the_lnet.ln_free_mds);
LNET_UNLOCK();
+ if (md != NULL)
+ CFS_INIT_LIST_HEAD(&md->md_list);
+
return (md);
}
{
/* NEVER called with liblock held */
lnet_libmd_t *md;
- int size;
+ unsigned int size;
unsigned int niov;
if ((umd->options & LNET_MD_KIOV) != 0) {
/* Set here in case of early free */
md->md_options = umd->options;
md->md_niov = niov;
+ CFS_INIT_LIST_HEAD(&md->md_list);
}
return (md);
lnet_md_free (lnet_libmd_t *md)
{
/* ALWAYS called with liblock held */
- int size;
+ unsigned int size;
if ((md->md_options & LNET_MD_KIOV) != 0)
size = offsetof(lnet_libmd_t, md_iov.kiov[md->md_niov]);
lnet_eq2handle (lnet_handle_eq_t *handle, lnet_eq_t *eq)
{
if (eq == NULL) {
- *handle = LNET_EQ_NONE;
+ LNetInvalidateHandle(handle);
return;
}