Commit 5d2accea authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Patch cache_delete_entry_internal() as suggested by

  Daniel Carroll <dan@mesa7.mesa.colorado.edu>
This patch ensures we try deleting the entry from both the
dntree and the idtree.
parent 9e97da14
...@@ -417,18 +417,24 @@ cache_delete_entry_internal( ...@@ -417,18 +417,24 @@ cache_delete_entry_internal(
Entry *e Entry *e
) )
{ {
int rc = 0; /* return code */
/* dn tree */ /* dn tree */
if ( avl_delete( &cache->c_dntree, (caddr_t) e, cache_entrydn_cmp ) if ( avl_delete( &cache->c_dntree, (caddr_t) e, cache_entrydn_cmp )
== NULL ) == NULL )
{ {
return( -1 ); rc = -1;
} }
/* id tree */ /* id tree */
if ( avl_delete( &cache->c_idtree, (caddr_t) e, cache_entryid_cmp ) if ( avl_delete( &cache->c_idtree, (caddr_t) e, cache_entryid_cmp )
== NULL ) == NULL )
{ {
return( -1 ); rc = -1;
}
if (rc != 0) {
return rc;
} }
/* lru */ /* lru */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment