From 00ef8d08a9edc88f8b50d5761a8f96583fc39591 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Fri, 21 Feb 2020 18:36:42 +0300 Subject: [PATCH] LU-13229 ldlm: unlock request memory leak resending an unlock request can caused an memory leak as new request will allocated on resend. Lets finish a request before resend. Fixes: 85a12c6c8d7 ("LU-12828 ldlm: FLOCK request can be processed twice") Cray-bug-id: LUS-8447 Signed-off-by: Alexey Lyashkov Change-Id: I15dfe0388d1305c8eb5be18b19b0ffc687454ef1 Reviewed-on: https://review.whamcloud.com/37670 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andriy Skulysh Reviewed-by: Andreas Dilger Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/mdc/mdc_locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 574d09b..e3b04b0 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -987,11 +987,11 @@ resend: can not rely on caller and this mainly for F_UNLCKs (explicits or automatically generated by Kernel to clean current FLocks upon exit) that can't be trashed */ + ptlrpc_req_finished(req); if (((rc == -EINTR) || (rc == -ETIMEDOUT)) && (einfo->ei_type == LDLM_FLOCK) && (einfo->ei_mode == LCK_NL)) goto resend; - ptlrpc_req_finished(req); RETURN(rc); } -- 1.8.3.1