name cache: no longer copies fh for negative entries

nfs41_name_cache_lookup() was returning FILE_NOT_FOUND on negative entries, but still copying the target filehandle

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-06-14 12:29:19 -04:00
parent 6a9a9bb932
commit a4c726f92d

View file

@ -581,6 +581,7 @@ static int name_cache_lookup(
target = name_cache_search(cache, parent, &component); target = name_cache_search(cache, parent, &component);
path_pos = component.name + component.len; path_pos = component.name + component.len;
if (target == NULL || (skip_invis && entry_invis(target, is_negative))) { if (target == NULL || (skip_invis && entry_invis(target, is_negative))) {
target = NULL;
if (is_last_component(component.name, path_end)) if (is_last_component(component.name, path_end))
status = ERROR_FILE_NOT_FOUND; status = ERROR_FILE_NOT_FOUND;
else else