]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-bdb/init.c
Unify use of BDB lockers
[openldap] / servers / slapd / back-bdb / init.c
index 018a741421a3f275e151400a3e76d6700a2b4aaf..135f101702bc0a0e9d214116b12d8fdb52b56340 100644 (file)
@@ -423,10 +423,6 @@ bdb_db_open( BackendDB *be )
                goto fail;
        }
 
-       if ( !quick ) {
-               XLOCK_ID(bdb->bi_dbenv, &bdb->bi_cache.c_locker);
-       }
-
        /* monitor setup */
        rc = bdb_monitor_db_open( be );
        if ( rc != 0 ) {
@@ -473,7 +469,7 @@ bdb_db_close( BackendDB *be )
 
        bdb_cache_release_all (&bdb->bi_cache);
 
-       if ( bdb->bi_idl_cache_max_size ) {
+       if ( bdb->bi_idl_cache_size ) {
                avl_free( bdb->bi_idl_tree, NULL );
                bdb->bi_idl_tree = NULL;
                entry = bdb->bi_idl_lru_head;
@@ -490,12 +486,6 @@ bdb_db_close( BackendDB *be )
 
        /* close db environment */
        if( bdb->bi_dbenv ) {
-               /* Free cache locker if we enabled locking */
-               if ( !( slapMode & SLAP_TOOL_QUICK )) {
-                       XLOCK_ID_FREE(bdb->bi_dbenv, bdb->bi_cache.c_locker);
-                       bdb->bi_cache.c_locker = 0;
-               }
-
                /* force a checkpoint, but not if we were ReadOnly,
                 * and not in Quick mode since there are no transactions there.
                 */