]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, hdb_cache_find_parent
authorHoward Chu <hyc@openldap.org>
Mon, 1 Jan 2007 07:09:22 +0000 (07:09 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 1 Jan 2007 07:09:22 +0000 (07:09 +0000)
servers/slapd/back-bdb/cache.c

index 11488267740c2d1114d2c88beb5330dd3b271c4d..1962778208bd661e3a10b21270f9ff1708c3557e 100644 (file)
@@ -495,13 +495,14 @@ hdb_cache_find_parent(
                        bdb_cache_entryinfo_lock( ei2 );
                        ein->bei_parent = ei2;
 
+                       avl_insert( &ei2->bei_kids, (caddr_t)ein, bdb_rdn_cmp,
+                               avl_dup_error);
+                       ei2->bei_ckids++;
+
                        /* Reset all the state info */
                        for (ein = eir; ein != ei2; ein=ein->bei_parent)
                                ein->bei_state &= ~CACHE_ENTRY_NOT_LINKED;
 
-                       avl_insert( &ei2->bei_kids, (caddr_t)ein, bdb_rdn_cmp,
-                               avl_dup_error);
-                       ei2->bei_ckids++;
                        bdb_cache_entryinfo_unlock( ei2 );
                        bdb_cache_entryinfo_lock( eir );