From: Howard Chu Date: Wed, 18 Nov 2015 23:38:34 +0000 (+0000) Subject: ITS#8315 fix ovpage_free X-Git-Tag: LMDB_0.9.17~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1edb0e3a42826b488cda0677e96d9bc16eba95cc;p=openldap ITS#8315 fix ovpage_free Keep dirty_room sync'd with dirty_list --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index deeaf9cc37..5cd4536efb 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -5449,6 +5449,7 @@ mdb_ovpage_free(MDB_cursor *mc, MDB_page *mp) return MDB_CORRUPTED; } } + txn->mt_dirty_room++; if (!(env->me_flags & MDB_WRITEMAP)) mdb_dpage_free(env, mp); release: @@ -6583,6 +6584,7 @@ current: return ENOMEM; id2.mid = pg; id2.mptr = np; + /* Note - this page is already counted in parent's dirty_room */ rc2 = mdb_mid2l_insert(mc->mc_txn->mt_u.dirty_list, &id2); mdb_cassert(mc, rc2 == 0); if (!(flags & MDB_RESERVE)) {