]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/add.c
Code clean-up.
[openldap] / servers / slapd / back-ldbm / add.c
index b99ade9cf510382d53819bc507865fbf569355f2..4b929987ae726d2ff50d9e432fdf30d50ff2a903 100644 (file)
@@ -126,7 +126,7 @@ ldbm_back_add(
        /*
         * Try to add the entry to the cache, assign it a new dnid.
         */
-       rc = cache_add_entry_rw(&li->li_cache, e, ENTRY_STATE_CREATING, 1);
+       rc = cache_add_entry_rw(&li->li_cache, e, CACHE_WRITE_LOCK);
 
        if ( rc != 0 ) {
                if( p != NULL) {
@@ -218,8 +218,6 @@ return_results:;
                ldap_pvt_thread_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 );