From c095fbda55ca632cff2696550f22a13a19ee4514 Mon Sep 17 00:00:00 2001 From: Chris Horn Date: Thu, 11 Jul 2019 15:08:30 -0500 Subject: [PATCH] LU-12441 lnet: Detach rspt when md_threshold is infinite MDs for pings use the infinite threshold on MD operations. As such they aren't normally unlinkable as determined by lnet_md_unlinkable(). We can cover this case by checking whether the refcount is zero and threshold is LNET_MD_THRESH_INF. Signed-off-by: Chris Horn Signed-off-by: Amir Shehata Change-Id: Ib51f84d85005dd2d13dadca059a1d6c42ff3bf59 Reviewed-on: https://review.whamcloud.com/36634 Tested-by: jenkins Reviewed-by: Serguei Smirnov Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/lnet/lib-msg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lnet/lnet/lib-msg.c b/lnet/lnet/lib-msg.c index 6038a71..6e474ab 100644 --- a/lnet/lnet/lib-msg.c +++ b/lnet/lnet/lib-msg.c @@ -779,10 +779,12 @@ lnet_msg_detach_md(struct lnet_msg *msg, int cpt, int status) lnet_eq_enqueue_event(md->md_eq, &msg->msg_ev); } - if (unlink) { + if (unlink || (md->md_refcount == 0 && + md->md_threshold == LNET_MD_THRESH_INF)) lnet_detach_rsp_tracker(md, cpt); + + if (unlink) lnet_md_unlink(md); - } msg->msg_md = NULL; } -- 1.8.3.1