From: Benny Halevy <bhalevy@tonian.com>
To: ycnian@gmail.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] pnfsd: Update the reference of nfs4_layout_state properly
Date: Mon, 21 Jan 2013 16:47:35 +0200 [thread overview]
Message-ID: <50FD5507.4010303@tonian.com> (raw)
In-Reply-To: <1358217471-18458-1-git-send-email-ycnian@gmail.com>
On 2013-01-15 04:37, ycnian@gmail.com wrote:
> From: Yanchuan Nian <ycnian@gmail.com>
>
> The reference of nfs4_layout_state is set to 1 when creating.
> it isn't necessary to increase the reference again in
> nfs4_process_layout_stateid(), otherwise it will lead to a
> memory leak.
>
> Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
Thanks. Committing for pnfs-all-3.7 and latest.
Benny
> ---
> fs/nfsd/nfs4pnfsd.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
> index 2211b50..dd7856c 100644
> --- a/fs/nfsd/nfs4pnfsd.c
> +++ b/fs/nfsd/nfs4pnfsd.c
> @@ -248,10 +248,10 @@ nfs4_process_layout_stateid(struct nfs4_client *clp, struct nfs4_file *fp,
> status = nfserr_bad_stateid;
> goto out;
> }
> + get_layout_state(ls);
> }
> status = 0;
>
> - get_layout_state(ls);
> *lsp = ls;
> dprintk("%s: layout stateid=" STATEID_FMT " ref=%d\n", __func__,
> STATEID_VAL(&ls->ls_stid.sc_stateid), atomic_read(&ls->ls_ref.refcount));
>
prev parent reply other threads:[~2013-01-21 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 2:37 [PATCH] pnfsd: Update the reference of nfs4_layout_state properly ycnian
2013-01-21 14:47 ` Benny Halevy [this message]
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=50FD5507.4010303@tonian.com \
--to=bhalevy@tonian.com \
--cc=linux-nfs@vger.kernel.org \
--cc=ycnian@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.