All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Bryan Schumaker <bjschuma@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFSD: Added TEST_STATEID opreation
Date: Fri, 13 May 2011 17:39:06 -0400	[thread overview]
Message-ID: <20110513213906.GC14771@fieldses.org> (raw)
In-Reply-To: <4DCAB73B.4040700@netapp.com>

On Wed, May 11, 2011 at 12:20:11PM -0400, Bryan Schumaker wrote:
> On 05/09/2011 08:49 PM, J. Bruce Fields wrote:
> > On Fri, May 06, 2011 at 02:57:35PM -0400, bjschuma@netapp.com wrote:
> >> +
> >> +	test_stateid->ts_stateids = nfsd4_alloc_ts_pagearray(test_stateid, sizeof(stateid_t));
> >> +	if (IS_ERR(test_stateid->ts_stateids))
> >> +		return PTR_ERR(test_stateid->ts_stateids);
> >> +
> >> +	test_stateid->ts_valid = nfsd4_alloc_ts_pagearray(test_stateid, sizeof(int));
> > 
> > Will this be freed in every case?  I guess you're assuming the encode
> > function will be called whenever the decode succeeds.  Off the top of my
> > head, I don't think that's true if xdr decoding of a later op fails.
> 
> That was what I was assuming.  What is the best way to free this if a later decode fails?  something in nfsd4_proc_compound()?

I had to look at it again and remind myself....  See defer_free() in
fs/nfsd/nfs4xdr.c.

--b.

      reply	other threads:[~2011-05-13 21:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06 18:57 [PATCH 0/2] NFSD: add FREE_STATEID and TEST_STATEID operations bjschuma
2011-05-06 18:57 ` [PATCH 1/2] NFSD: added FREE_STATEID operation bjschuma
2011-05-10  0:36   ` J. Bruce Fields
2011-05-11 14:41     ` Bryan Schumaker
2011-05-13 21:36       ` J. Bruce Fields
2011-05-06 18:57 ` [PATCH 2/2] NFSD: Added TEST_STATEID opreation bjschuma
2011-05-10  0:49   ` J. Bruce Fields
2011-05-11 16:20     ` Bryan Schumaker
2011-05-13 21:39       ` J. Bruce Fields [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=20110513213906.GC14771@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=bjschuma@netapp.com \
    --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 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.