]> git.sur5r.net Git - openldap/commitdiff
Import add.c cache_set_state deadlock fix.
authorKurt Zeilenga <kurt@openldap.org>
Tue, 26 Jan 1999 05:24:18 +0000 (05:24 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 26 Jan 1999 05:24:18 +0000 (05:24 +0000)
servers/slapd/back-ldbm/add.c

index 8e8316c196b8d13c00729880574046ddbd1107e8..28fdc31e7b253c896435483f1666a53b012b5dcb 100644 (file)
@@ -221,8 +221,6 @@ ldbm_back_add(
        rc = 0;
 
 return_results:;
-       cache_set_state( &li->li_cache, e, 0 );
-
        if (p != NULL) {
                /* free parent and writer lock */
                cache_return_entry_w( &li->li_cache, p ); 
@@ -233,6 +231,8 @@ return_results:;
                pthread_mutex_unlock(&li->li_root_mutex);
        }
 
+       cache_set_state( &li->li_cache, e, 0 );
+
        /* free entry and writer lock */
        cache_return_entry_w( &li->li_cache, e );