From 9b516293b9b107cee50568a5b4670fbde6177dba Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 29 Apr 2008 21:44:47 +0000 Subject: [PATCH] Fix prev cache.c commit --- servers/slapd/back-bdb/cache.c | 2 +- servers/slapd/back-bdb/delete.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-bdb/cache.c b/servers/slapd/back-bdb/cache.c index c778d81d28..edf73ab28c 100644 --- a/servers/slapd/back-bdb/cache.c +++ b/servers/slapd/back-bdb/cache.c @@ -1292,7 +1292,7 @@ bdb_cache_delete_cleanup( Cache *cache, EntryInfo *ei ) { - bdb_cache_entryinfo_lock( ei ); + /* Enter with ei locked */ if ( ei->bei_e ) { ei->bei_e->e_private = NULL; diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index dfa50bed0a..5008be4344 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -572,6 +572,7 @@ return_results: if( e != NULL ) { if ( rs->sr_err == LDAP_SUCCESS ) { /* Free the EntryInfo and the Entry */ + bdb_cache_entryinfo_lock( BEI(e) ); bdb_cache_delete_cleanup( &bdb->bi_cache, BEI(e) ); } else { bdb_unlocked_cache_return_entry_w(&bdb->bi_cache, e); -- 2.39.5