[PATCH 02/16] nfsd: simplify exp_find_key return value

J. Bruce Fields bfields at fieldses.org
Tue May 22 12:35:14 EDT 2007


On Tue, May 22, 2007 at 04:55:33PM +1000, Neil Brown wrote:
> Only... doesn't "NULL" really mean -ENOMEM ?  And that can be subtly
> different from -ENOENT.
> 
> For example, in rqst_exp_get_by_name (patch 9) 
> if exp_get_by_name(rq_client) returns NULL we assume -ENOENT and try
> exp_get_by_name(rq_gssclient).
> However if the NULL really meant -ENOMEM, we should probably return
> -ENOMEM which becomes nfserr_dropit so the client will retry later
> when hopefully we have found some memory.
> 
> I definitely like the idea of using a single convention for returning
> errors.  I don't think I like merging -ENOENT and -ENOMEM into one.

Yup.  Something like this?  (Should apply on its own against mainline.
But compile-tested only at this point.)

--b.



More information about the NFSv4 mailing list