name cache: lookup semantics match nfs41_lookup() on NOENT

previously, when the name cache encountered a missing/negative/expired entry, it returned the previous two entries as 'target' and 'parent', and nfs41_lookup() started new lookups from the filehandle in 'target'.  this differs from nfs41_lookup(), which on NOENT will return NULL for the 'target' and the previous entry as 'parent'.  modified name_cache_lookup() to do the same, and updated nfs41_lookup() to start new lookups from the filehandle in 'parent'

now when nfs41_lookup() gets the is_negative flag from nfs41_name_cache_lookup(), it can just return the error without needing to copy the 'target' to 'parent'

Signed-off-by: Casey Bodley <cbodley@umich.edu>
This commit is contained in:
Casey Bodley 2010-10-11 16:07:53 -04:00
parent 765bc0284b
commit 794dfeca49
2 changed files with 12 additions and 12 deletions

View file

@ -458,14 +458,14 @@ int nfs41_lookup(
if (status == NO_ERROR || negative)
goto out;
if (target_out->fh.len) {
if (parent_out->fh.len) {
/* start where the name cache left off */
if (target_out != &target) {
if (&parent != parent_out) {
/* must make a copy for server_start, because
* server_lookup_loop() will overwrite target_out */
path_fh_copy(&target, target_out);
* server_lookup_loop() will overwrite parent_out */
path_fh_copy(&parent, parent_out);
}
server_start = &target;
server_start = &parent;
} else {
/* start with PUTROOTFH */
server_start = NULL;