Fix a memory leak that occurred in the pNFS client.
When a "pnfs" NFSv4.1 mount was unmounted, it didn't free up the layouts and deviceinfo structures. This leak only affects "pnfs" mounts and only when the mount is umounted. Found while testing the pNFS Flexible File layout client code. MFC after: 2 weeks
This commit is contained in:
parent
c2dc6d5db1
commit
bd290946e9
@ -1627,6 +1627,14 @@ nfscl_cleanclient(struct nfsclclient *clp)
|
||||
{
|
||||
struct nfsclowner *owp, *nowp;
|
||||
struct nfsclopen *op, *nop;
|
||||
struct nfscllayout *lyp, *nlyp;
|
||||
struct nfscldevinfo *dip, *ndip;
|
||||
|
||||
TAILQ_FOREACH_SAFE(lyp, &clp->nfsc_layout, nfsly_list, nlyp)
|
||||
nfscl_freelayout(lyp);
|
||||
|
||||
LIST_FOREACH_SAFE(dip, &clp->nfsc_devinfo, nfsdi_list, ndip)
|
||||
nfscl_freedevinfo(dip);
|
||||
|
||||
/* Now, all the OpenOwners, etc. */
|
||||
LIST_FOREACH_SAFE(owp, &clp->nfsc_owner, nfsow_list, nowp) {
|
||||
|
Loading…
Reference in New Issue
Block a user