-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
}
/* ensure all future handle lookups fail */
- lnet_invalidate_handle(&md->md_lh);
+ lnet_res_lh_invalidate(&md->md_lh);
}
if (md->md_refcount != 0) {
LASSERT (!cfs_list_empty(&md->md_list));
cfs_list_del_init (&md->md_list);
- lnet_md_free(md);
+ lnet_md_free_locked(md);
}
/* must be called with LNET_LOCK held */
eq->eq_refcount++;
/* It's good; let handle2md succeed and add to active mds */
- lnet_initialise_handle (&lmd->md_lh, LNET_COOKIE_TYPE_MD);
- LASSERT (cfs_list_empty(&lmd->md_list));
- cfs_list_add (&lmd->md_list, &the_lnet.ln_active_mds);
+ lnet_res_lh_initialize(&the_lnet.ln_md_container, &lmd->md_lh);
+ LASSERT(cfs_list_empty(&lmd->md_list));
+ cfs_list_add(&lmd->md_list, &the_lnet.ln_md_container.rec_active);
- return 0;
+ return 0;
}
/* must be called with LNET_LOCK held */
int
lnet_md_validate(lnet_md_t *umd)
{
- if (umd->start == NULL) {
- CERROR("MD start pointer can not be NULL\n");
+ if (umd->start == NULL && umd->length != 0) {
+ CERROR("MD start pointer can not be NULL with length %u\n",
+ umd->length);
return -EINVAL;
}
}
}
- lnet_md_free (md);
+ lnet_md_free_locked(md);
LNET_UNLOCK();
return (rc);
return (0);
}
- lnet_md_free (md);
+ lnet_md_free_locked(md);
LNET_UNLOCK();
return (rc);
if (md->md_eq != NULL &&
md->md_refcount == 0) {
lnet_build_unlink_event(md, &ev);
- lnet_enq_event_locked(md->md_eq, &ev);
+ lnet_eq_enqueue_event(md->md_eq, &ev);
}
lnet_md_unlink(md);