- for (idx = 0; idx < the_lnet.ln_nportals; idx++) {
- lnet_portal_t *ptl = &the_lnet.ln_portals[idx];
-
- LASSERT (cfs_list_empty(&ptl->ptl_msgq));
-
- while (!cfs_list_empty(&ptl->ptl_mlist)) {
- lnet_me_t *me = cfs_list_entry(ptl->ptl_mlist.next,
- lnet_me_t, me_list);
- CERROR ("Active ME %p on exit\n", me);
- cfs_list_del (&me->me_list);
- lnet_me_free (me);
- }
-
- if (ptl->ptl_mhash != NULL) {
- LASSERT (lnet_portal_is_unique(ptl));
- lnet_portal_mhash_free(ptl->ptl_mhash);
- }
- }
-
- while (!cfs_list_empty (&the_lnet.ln_active_mds)) {
- lnet_libmd_t *md = cfs_list_entry (the_lnet.ln_active_mds.next,
- lnet_libmd_t, md_list);
-
- CERROR ("Active MD %p on exit\n", md);
- cfs_list_del_init (&md->md_list);
- lnet_md_free (md);
- }
-
- while (!cfs_list_empty (&the_lnet.ln_active_eqs)) {
- lnet_eq_t *eq = cfs_list_entry (the_lnet.ln_active_eqs.next,
- lnet_eq_t, eq_list);
-
- CERROR ("Active EQ %p on exit\n", eq);
- cfs_list_del (&eq->eq_list);
- lnet_eq_free (eq);
- }
-
- while (!cfs_list_empty (&the_lnet.ln_active_msgs)) {
- lnet_msg_t *msg = cfs_list_entry (the_lnet.ln_active_msgs.next,
- lnet_msg_t, msg_activelist);
-
- CERROR ("Active msg %p on exit\n", msg);
- LASSERT (msg->msg_onactivelist);
- msg->msg_onactivelist = 0;
- cfs_list_del (&msg->msg_activelist);
- lnet_msg_free (msg);
- }