From: Alexey Lyashkov Date: Fri, 21 Feb 2020 15:36:42 +0000 (+0300) Subject: LU-13229 ldlm: unlock request memory leak X-Git-Tag: 2.13.53~139 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=00ef8d08a9edc88f8b50d5761a8f96583fc39591;p=fs%2Flustre-release.git 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 --- 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); }