[pnfs] [PATCH 2/2] pnfs: Release nfs4_client structure held by DS on unmount
Benny Halevy
bhalevy at panasas.com
Thu Mar 6 14:32:54 EST 2008
Merged onto the pnfs branch.
Benny
On Mar. 05, 2008, 2:03 +0200, Ricardo Labiaga <ricardo.labiaga at netapp.com> wrote:
> From: Ricardo Labiaga <Ricardo.Labiaga at netapp.com>
>
> Every Data Server "connection" holds an nfs4_client structure that is
> not being freed at unmount time. This patch fixes this memory leak.
> In addition, fix an nfs4_client leak in decode_and_add_device if
> decode_device fails.
>
> Signed-off-by: Andy Adamson<andros at umich.edu>
> Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga at netapp.com>
> ---
> fs/nfs/nfs4filelayoutdev.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
> index 479bb77..4d59311 100644
> --- a/fs/nfs/nfs4filelayoutdev.c
> +++ b/fs/nfs/nfs4filelayoutdev.c
> @@ -306,6 +306,7 @@ destroy_ds(struct nfs4_pnfs_ds *ds)
> ds->ds_clp->cl_rpcclient);
> rpc_shutdown_client(ds->ds_clp->cl_rpcclient);
> ds->ds_clp->cl_rpcclient = NULL;
> + nfs_put_client(ds->ds_clp);
> }
> kfree(ds);
> }
> @@ -609,6 +610,7 @@ decode_and_add_device(struct filelayout_mount_type *mt, struct pnfs_device *dev)
> if (!file_dev) {
> printk(KERN_WARNING "%s Could not decode device\n",
> __FUNCTION__);
> + device_destroy(file_dev, mt->hlist);
> return NULL;
> }
>
More information about the pNFS
mailing list