]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Import ITS#3494 fix from HEAD
authorHoward Chu <hyc@openldap.org>
Thu, 20 Jan 2005 19:56:58 +0000 (19:56 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 20 Jan 2005 19:56:58 +0000 (19:56 +0000)
servers/slapd/back-bdb/cache.c

index 7ce2c178ccef14464fc20e94304cab79ea75860a..7aa00628ce669fcb05681f4d5c7db5592dcad69f 100644 (file)
@@ -876,11 +876,12 @@ bdb_cache_add(
        }
        bdb_cache_entryinfo_unlock( eip );
 
-       /* set lru mutex */
-       ldap_pvt_thread_mutex_lock( &bdb->bi_cache.lru_mutex );
        ++bdb->bi_cache.c_cursize;
        ldap_pvt_thread_rdwr_wunlock( &bdb->bi_cache.c_rwlock );
 
+       /* set lru mutex */
+       ldap_pvt_thread_mutex_lock( &bdb->bi_cache.lru_mutex );
+
        /* lru_mutex is unlocked for us */
        bdb_cache_lru_add( bdb, locker, new );