]> err.no Git - linux-2.6/commit
NFSv2/v3: Fix a memory leak when using -onolock
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 12 Dec 2007 03:01:56 +0000 (22:01 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 12 Dec 2007 03:01:56 +0000 (22:01 -0500)
commit5cef338b30c110daf547fb13d99f0c77f2a79fbc
tree4608bf1961dfb3f2f50d72d1b3c7a82daf031933
parent4584f520e1f773082ef44ff4f8969a5d992b16ec
NFSv2/v3: Fix a memory leak when using -onolock

Neil Brown said:
> Hi Trond,
>
> We found that a machine which made moderately heavy use of
> 'automount' was leaking some nfs data structures - particularly the
> 4K allocated by rpc_alloc_iostats.
> It turns out that this only happens with filesystems with -onolock
> set.

> The problem is that if NFS_MOUNT_NONLM is set, nfs_start_lockd doesn't
> set server->destroy, so when the filesystem is unmounted, the
> ->client_acl is not shutdown, and so several resources are still
> held.  Multiple mount/umount cycles will slowly eat away memory
> several pages at a time.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: NeilBrown <neilb@suse.de>
fs/nfs/client.c