From: Hallvard Furuseth Date: Mon, 1 Dec 2014 07:59:29 +0000 (+0100) Subject: Simplify recent changes a bit. X-Git-Tag: LMDB_0.9.15~53 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3aa7537adc33b4b7ac36e1137aae18f840765153;p=openldap Simplify recent changes a bit. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index d4edda47bc..82c23dd0a5 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -2778,11 +2778,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); } @@ -2790,6 +2787,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. */