namecache: delegation-related fixes

open_update_cache() wasn't retrying insert after the open_delegation_return() error case
nfs41_name_cache_delegreturn() needs a check for if (attributes->delegated) to avoid an extra deref when the call to nfs41_name_cache_insert() failed
added a TODO comment to nfs41_client_delegation_return_lru() for improvements to the naive algorithm

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2011-08-25 13:53:39 -04:00 committed by unknown
parent 48fa809fc5
commit 0d86c68138
3 changed files with 19 additions and 17 deletions

View file

@ -361,10 +361,11 @@ retry_cache_insert:
goto retry_cache_insert;
}
if (status) {
if (status && delegation->type != OPEN_DELEGATE_NONE) {
/* if we can't make room in the cache, return this
* delegation immediately to free resources on the server */
open_delegation_return(session, file, delegation);
goto retry_cache_insert;
}
}