name cache: remove changes entry to negative

instead of calling name_cache_entry_unlink(), nfs41_name_cache_remove() calls name_cache_entry_update() with NULL for fh and info to make it a negative entry, then name_cache_unlink_children_recursive() to remove any children

Signed-off-by: Casey Bodley <cbodley@umich.edu>
This commit is contained in:
Casey Bodley 2010-10-11 16:06:19 -04:00
parent 6ee8bba79e
commit 61ddf671fa

View file

@ -994,8 +994,12 @@ int nfs41_name_cache_remove(
if (status == ERROR_FILE_NOT_FOUND) if (status == ERROR_FILE_NOT_FOUND)
goto out_unlock; goto out_unlock;
target->attributes->numlinks--; if (target->attributes)
name_cache_unlink(cache, target); target->attributes->numlinks--;
/* make this a negative entry and unlink children */
name_cache_entry_update(cache, target, NULL, NULL);
name_cache_unlink_children_recursive(cache, target);
out_unlock: out_unlock:
ReleaseSRWLockExclusive(&cache->lock); ReleaseSRWLockExclusive(&cache->lock);