[lustre-devel] [PATCH 03/20] lnet: use lnet_md_free in lnet_res_container_cleanup()
James Simmons
jsimmons at infradead.org
Sat Jun 13 09:26:59 PDT 2020
From: NeilBrown <neilb at suse.de>
When we added lnet_md_free(), we should have called it
from lnet_res_container_cleanup() - but that was missed.
Fix it now.
Reviewed-by: James Simmons <jsimmons at infradead.org>
Signed-off-by: NeilBrown <neilb at suse.de>
---
net/lnet/lnet/api-ni.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c
index 7c91800..d6694cb 100644
--- a/net/lnet/lnet/api-ni.c
+++ b/net/lnet/lnet/api-ni.c
@@ -927,12 +927,10 @@ static void lnet_assert_wire_constants(void)
struct list_head *e = rec->rec_active.next;
list_del_init(e);
- if (rec->rec_type == LNET_COOKIE_TYPE_MD) {
- kfree(list_entry(e, struct lnet_libmd, md_list));
-
- } else { /* NB: Active MEs should be attached on portals */
+ if (rec->rec_type == LNET_COOKIE_TYPE_MD)
+ lnet_md_free(list_entry(e, struct lnet_libmd, md_list));
+ else /* NB: Active MEs should be attached on portals */
LBUG();
- }
count++;
}
--
1.8.3.1
More information about the lustre-devel
mailing list