Re: [PATCH 2/2] NFSD: Added TEST_STATEID opreation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux