svn commit: r324529 - stable/11/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Wed Oct 11 13:20:26 UTC 2017
Author: rmacklem
Date: Wed Oct 11 13:20:24 2017
New Revision: 324529
URL: https://svnweb.freebsd.org/changeset/base/324529
Log:
MFC: r324074
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.
Modified:
stable/11/sys/fs/nfsclient/nfs_clstate.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/11/sys/fs/nfsclient/nfs_clstate.c Wed Oct 11 11:03:11 2017 (r324528)
+++ stable/11/sys/fs/nfsclient/nfs_clstate.c Wed Oct 11 13:20:24 2017 (r324529)
@@ -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) {
More information about the svn-src-stable-11
mailing list