Simplify recent changes a bit.

vl32b
Hallvard Furuseth 10 years ago
parent 9a72292ac1
commit 42110d83a9
  1. 6
      libraries/liblmdb/mdb.c

@ -2820,11 +2820,8 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
txn->mt_dbxs = NULL; /* mark txn as reset */ txn->mt_dbxs = NULL; /* mark txn as reset */
} else { } else {
pgno_t *pghead = env->me_pghead; pgno_t *pghead = env->me_pghead;
env->me_pghead = NULL;
env->me_pglast = 0;
mdb_cursors_close(txn, 0); mdb_cursors_close(txn, 0);
if (!(env->me_flags & MDB_WRITEMAP)) { if (!(env->me_flags & MDB_WRITEMAP)) {
mdb_dlist_free(txn); mdb_dlist_free(txn);
} }
@ -2832,6 +2829,9 @@ mdb_txn_reset0(MDB_txn *txn, const char *act)
if (!txn->mt_parent) { if (!txn->mt_parent) {
if (mdb_midl_shrink(&txn->mt_free_pgs)) if (mdb_midl_shrink(&txn->mt_free_pgs))
env->me_free_pgs = 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; env->me_txn = NULL;
/* The writer mutex was locked in mdb_txn_begin. */ /* The writer mutex was locked in mdb_txn_begin. */

Loading…
Cancel
Save