namecache: bug fix for name_cache_insert()
once the attribute cache fills up with delegated entries, attr_cache_find_or_create() will start returning ERROR_OUTOFMEMORY. this is a problem for nfs41_name_cache_insert(), because name_cache_find_or_create() will succeed and then name_cache_entry_update() will fail. this leaves behind a name cache entry with attributes=NULL, which is treated like a negative entry and causes later lookups to fail with ERROR_FILE_NOT_FOUND added a call to name_cache_entry_invalidate() to clean up this entry if name_cache_entry_update() fails Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
bd21801819
commit
28032a0309
1 changed files with 2 additions and 0 deletions
|
|
@ -895,6 +895,8 @@ int nfs41_name_cache_insert(
|
|||
goto out_err_deleg;
|
||||
|
||||
status = name_cache_entry_update(cache, target, fh, info, delegation);
|
||||
if (status)
|
||||
name_cache_entry_invalidate(cache, target);
|
||||
|
||||
out_unlock:
|
||||
ReleaseSRWLockExclusive(&cache->lock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue