From 1bb93ae084476ccceb7b6c0c14454dbd91ddb8dd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 27 Nov 2004 08:55:04 +0000 Subject: [PATCH] Fix modify serialization --- servers/slapd/overlays/syncprov.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index f6f414aa1c..d25b22aca6 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -970,6 +970,7 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs ) mtdummy.mt_op = op; ldap_pvt_thread_mutex_lock( &si->si_mods_mutex ); mt = avl_find( si->si_mods, &mtdummy, sp_avl_cmp ); + ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); if ( mt ) { modinst *mi = mt->mt_mods; @@ -980,13 +981,14 @@ syncprov_op_cleanup( Operation *op, SlapReply *rs ) mt->mt_op = mt->mt_mods->mi_op; ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); } else { + ldap_pvt_thread_mutex_lock( &si->si_mods_mutex ); avl_delete( &si->si_mods, mt, sp_avl_cmp ); + ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); ldap_pvt_thread_mutex_destroy( &mt->mt_mutex ); ch_free( mt ); } } - ldap_pvt_thread_mutex_unlock( &si->si_mods_mutex ); op->o_callback = cb->sc_next; op->o_tmpfree(cb, op->o_tmpmemctx); } -- 2.39.5