|
|
@@ -391,6 +391,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
|
|
|
int mod_count = 0;
|
|
|
int not_an_error = 0;
|
|
|
int fixup_tombstone = 0;
|
|
|
+ int ec_locked = 0;
|
|
|
|
|
|
slapi_pblock_get( pb, SLAPI_BACKEND, &be);
|
|
|
slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li );
|
|
|
@@ -799,6 +800,7 @@ ldbm_back_modify( Slapi_PBlock *pb )
|
|
|
CACHE_RETURN( &inst->inst_cache, &e );
|
|
|
/* lock new entry in cache to prevent usage until we are complete */
|
|
|
cache_lock_entry( &inst->inst_cache, ec );
|
|
|
+ ec_locked = 1;
|
|
|
postentry = slapi_entry_dup( ec->ep_entry );
|
|
|
slapi_pblock_set( pb, SLAPI_ENTRY_POST_OP, postentry );
|
|
|
|
|
|
@@ -919,7 +921,7 @@ common_return:
|
|
|
slapi_mods_done(&smods);
|
|
|
|
|
|
if (inst) {
|
|
|
- if (cache_is_in_cache(&inst->inst_cache, ec)) {
|
|
|
+ if (ec_locked || cache_is_in_cache(&inst->inst_cache, ec)) {
|
|
|
cache_unlock_entry(&inst->inst_cache, ec);
|
|
|
} else if (e) {
|
|
|
/* if ec was not in cache, cache_replace was not done.
|