]> git.sur5r.net Git - openldap/commitdiff
Simplify recent changes a bit.
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Dec 2014 07:59:29 +0000 (08:59 +0100)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Dec 2014 07:59:29 +0000 (08:59 +0100)
libraries/liblmdb/mdb.c

index 3b82277a56ba4d91af600a56e9d6b7ad085caaa2..51d97d6d315f8fe382714b205f6fba43cf159dd0 100644 (file)
@@ -2820,11 +2820,8 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
                txn->mt_dbxs = NULL;    /* mark txn as reset */
        } else {
                pgno_t *pghead = env->me_pghead;
-               env->me_pghead = NULL;
-               env->me_pglast = 0;
 
                mdb_cursors_close(txn, 0);
-
                if (!(env->me_flags & MDB_WRITEMAP)) {
                        mdb_dlist_free(txn);
                }
@@ -2832,6 +2829,9 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
                if (!txn->mt_parent) {
                        if (mdb_midl_shrink(&txn->mt_free_pgs))
                                env->me_free_pgs = txn->mt_free_pgs;
+                       /* me_pgstate: */
+                       env->me_pghead = NULL;
+                       env->me_pglast = 0;
 
                        env->me_txn = NULL;
                        /* The writer mutex was locked in mdb_txn_begin. */