From 8c4cb540542fdd86c22ee71952e585a82865b0cd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 25 Feb 2015 06:11:44 +0000 Subject: [PATCH] ITS#8063 more for prev commit --- servers/slapd/overlays/syncprov.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 47a5ae9141..396594eda9 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2120,8 +2120,16 @@ syncprov_op_mod( Operation *op, SlapReply *rs ) mt->mt_tail = mi; /* wait for this op to get to head of list */ while ( mt->mt_mods != mi ) { + modinst *m2; + int same = 0; /* don't wait on other mods from the same thread */ - if ( mt->mt_mods->mi_op->o_threadctx == op->o_threadctx ) + for ( m2 = mt->mt_mods; m2; m2 = m2->mi_next ) { + if ( m2->mi_op->o_threadctx == op->o_threadctx ) { + same = 1; + break; + } + } + if ( same ) break; ldap_pvt_thread_mutex_unlock( &mt->mt_mutex ); -- 2.39.5