Commit 45500b3b authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Import rootlock change from rel eng 1.2

parent a0b1dfad
......@@ -124,8 +124,8 @@ ldbm_back_add(
* and release the add lock.
*/
pthread_mutex_lock(&li->li_root_mutex);
rootlock = 1;
pthread_mutex_unlock(&li->li_add_mutex);
rootlock=1;
}
/*
......@@ -139,7 +139,8 @@ ldbm_back_add(
if( p != NULL) {
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );
} else if ( rootlock ) {
}
if ( rootlock ) {
/* release root lock */
pthread_mutex_unlock(&li->li_root_mutex);
}
......@@ -217,8 +218,9 @@ return_results:;
if (p != NULL) {
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );
}
} else if ( rootlock ) {
if ( rootlock ) {
/* release root lock */
pthread_mutex_unlock(&li->li_root_mutex);
}
......
......@@ -140,8 +140,9 @@ return_results:;
if( p != NULL ) {
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );
}
} else if ( rootlock ) {
if ( rootlock ) {
/* release root lock */
pthread_mutex_unlock(&li->li_root_mutex);
}
......
......@@ -32,6 +32,7 @@ ldbm_back_modify(
Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
/* acquire and lock entry */
if ( (e = dn2entry_w( be, dn, &matched )) == NULL ) {
send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT, matched,
NULL );
......@@ -41,10 +42,6 @@ ldbm_back_modify(
return( -1 );
}
/* check for deleted */
/* lock entry */
if ( (err = acl_check_mods( be, conn, op, e, mods )) != LDAP_SUCCESS ) {
send_ldap_result( conn, op, err, NULL, NULL );
goto error_return;
......
......@@ -168,8 +168,9 @@ return_results:
if( p != NULL ) {
/* free parent and writer lock */
cache_return_entry_w( &li->li_cache, p );
}
} else if ( rootlock ) {
if ( rootlock ) {
/* release root writer lock */
pthread_mutex_unlock(&li->li_root_mutex);
}
......
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