linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nfs@vger.kernel.org, bfields@fieldses.org
Subject: Re: [PATCH] nfsd4: fix memory leak in nfsd4_encode_fattr()
Date: Mon, 10 Mar 2014 16:29:13 +0800	[thread overview]
Message-ID: <531D77D9.40900@intel.com> (raw)
In-Reply-To: <20140310080437.GA24753@infradead.org>

On 03/10/2014 04:04 PM, Christoph Hellwig wrote:
> On Mon, Mar 10, 2014 at 12:52:07PM +0800, Yan, Zheng wrote:
>> fh_put() does not free the temporary file handle.
> 
> Btw, it seems like the code to generate the file handle if it's missing
> should be moved out of nfsd4_encode_fattr and into
> nfsd4_encode_dirent_fattr or a small helper just called from there so that:
> 
>  a) the code flow is more obvious
>  b) the calling conventions for nfsd4_encode_fattr are sensible
>  c) nfsd4_encode_fattr shrinks at least a tiny bit
>  d) the required cleanup becomes more obvious by being paired with the
>     allocation and initialization of the FH.
> 
> Just curious: which client asks for the FH or FSID in READDIRPLUS?
> 

Both nfs server and client are complied from 3.14-rc5 kernel. The exported
FS is Ceph.

Regards
Yan, Zheng
 

  reply	other threads:[~2014-03-10  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10  4:52 [PATCH] nfsd4: fix memory leak in nfsd4_encode_fattr() Yan, Zheng
2014-03-10  8:04 ` Christoph Hellwig
2014-03-10  8:29   ` Yan, Zheng [this message]
2014-03-31 21:11 ` J. Bruce Fields

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=531D77D9.40900@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-nfs@vger.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;
as well as URLs for NNTP newsgroup(s).