Whamcloud - gitweb
LU-13029 lnet: fix asym routing with multi-hop
[fs/lustre-release.git] / lnet / lnet / lib-ptl.c
index 3773ed9..abdd6ae 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -768,11 +768,14 @@ lnet_ptl_cleanup(struct lnet_portal *ptl)
                                                struct lnet_me, me_list);
                                CERROR("Active ME %p on exit\n", me);
                                list_del(&me->me_list);
-                               lnet_me_free(me);
+                               CDEBUG(D_MALLOC,
+                                      "slab-freed 'me' at %p in cleanup.\n",
+                                      me);
+                               kmem_cache_free(lnet_mes_cachep, me);
                        }
                }
                /* the extra entry is for MEs with ignore bits */
-               LIBCFS_FREE(mhash, sizeof(*mhash) * (LNET_MT_HASH_SIZE + 1));
+               CFS_FREE_PTR_ARRAY(mhash, LNET_MT_HASH_SIZE + 1);
        }
 
        cfs_percpt_free(ptl->ptl_mtables);
@@ -920,7 +923,7 @@ int
 lnet_clear_lazy_portal(struct lnet_ni *ni, int portal, char *reason)
 {
        struct lnet_portal      *ptl;
-       struct list_head        zombies = LIST_HEAD_INIT(zombies);
+       LIST_HEAD(zombies);
 
        if (portal < 0 || portal >= the_lnet.ln_nportals)
                return -EINVAL;