Linux NFS development
 help / color / mirror / Atom feed
From: bfields <bfields@fieldses.org>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-nfs <linux-nfs@vger.kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 2/2] nfsd: Fix memleak.
Date: Tue, 29 Jan 2013 17:29:26 -0500	[thread overview]
Message-ID: <20130129222926.GA6219@fieldses.org> (raw)
In-Reply-To: <201301291315585633212@gmail.com>

Tejun, maybe this could be added to your series?

(Or should I just take it without the idr_remove_all()?)

--b.

On Tue, Jan 29, 2013 at 01:16:06PM +0800, majianpeng wrote:
> When free nfs-client, it must free the ->cl_stateids.
> 
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
>  fs/nfsd/nfs4state.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index ac8ed96..a8309c6 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -1060,6 +1060,8 @@ free_client(struct nfs4_client *clp)
>  	}
>  	free_svc_cred(&clp->cl_cred);
>  	kfree(clp->cl_name.data);
> +	idr_remove_all(&clp->cl_stateids);
> +	idr_destroy(&clp->cl_stateids);
>  	kfree(clp);
>  }
>  
> -- 
> 1.7.9.5

  reply	other threads:[~2013-01-29 22:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  5:16 [PATCH 2/2] nfsd: Fix memleak majianpeng
2013-01-29 22:29 ` bfields [this message]
2013-02-04 19:29   ` Tejun Heo
2013-02-05 14:43     ` bfields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130129222926.GA6219@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=majianpeng@gmail.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox