Whamcloud - gitweb
LU-56 lnet: cleanup for LNet Event Queue
[fs/lustre-release.git] / lnet / lnet / lib-md.c
index 71b84bc..821178d 100644 (file)
@@ -60,7 +60,7 @@ lnet_md_unlink(lnet_libmd_t *md)
                 }
 
                 /* ensure all future handle lookups fail */
-                lnet_invalidate_handle(&md->md_lh);
+               lnet_res_lh_invalidate(&md->md_lh);
         }
 
         if (md->md_refcount != 0) {
@@ -77,7 +77,7 @@ lnet_md_unlink(lnet_libmd_t *md)
 
         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 */
@@ -184,11 +184,11 @@ lib_md_build(lnet_libmd_t *lmd, lnet_md_t *umd, int unlink)
                 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 */
@@ -302,7 +302,7 @@ LNetMDAttach(lnet_handle_me_t meh, lnet_md_t umd,
                 }
         }
 
-        lnet_md_free (md);
+       lnet_md_free_locked(md);
 
         LNET_UNLOCK();
         return (rc);
@@ -356,7 +356,7 @@ LNetMDBind(lnet_md_t umd, lnet_unlink_t unlink, lnet_handle_md_t *handle)
                 return (0);
         }
 
-        lnet_md_free (md);
+       lnet_md_free_locked(md);
 
         LNET_UNLOCK();
         return (rc);
@@ -415,7 +415,7 @@ LNetMDUnlink (lnet_handle_md_t mdh)
         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);