[LU-13229] Flock unlock request resend caused a memory leak. Created: 10/Feb/20 Updated: 05/Mar/20 Resolved: 05/Mar/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexey Lyashkov | Assignee: | Alexey Lyashkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
@@ -922,6 +932,7 @@ resend:
LASSERTF(einfo->ei_type == LDLM_FLOCK, “lock type %d\n”,
einfo->ei_type);
res_id.name[3] = LDLM_FLOCK;
+ req = ldlm_enqueue_pack(exp, 0);
...
@@ -973,6 +971,7 @@ resend:
rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, policy, &flags, NULL,
0, lvb_type, lockh, 0);
+
if (!it) {
/* For flock requests we immediatelly return without further
delay and let caller deal with the rest, since rest of
@@ -986,12 +985,10 @@ resend:
(einfo->ei_type == LDLM_FLOCK) &&
(einfo->ei_mode == LCK_NL))
goto resend;
+ ptlrpc_req_finished(req);
RETURN(rc);
}
So new request will allocated on resend case, but it don't freed in unlock resend case. |
| Comments |
| Comment by Gerrit Updater [ 21/Feb/20 ] |
|
Alexey Lyashkov (alexey.lyashkov@hpe.com) uploaded a new patch: https://review.whamcloud.com/37670 |
| Comment by Gerrit Updater [ 05/Mar/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/37670/ |
| Comment by Peter Jones [ 05/Mar/20 ] |
|
Landed for 2.14 |