diff options
Diffstat (limited to 'src/btree/bt_evict.c')
-rw-r--r-- | src/btree/bt_evict.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c index e35752aef6d..ac8f888f2a5 100644 --- a/src/btree/bt_evict.c +++ b/src/btree/bt_evict.c @@ -383,6 +383,7 @@ __evict_request_walk(WT_SESSION_IMPL *session) WT_SESSION_IMPL *request_session; WT_CACHE *cache; WT_EVICT_REQ *er, *er_end; + WT_PAGE *page; WT_REF *ref; int ret; @@ -412,6 +413,16 @@ __evict_request_walk(WT_SESSION_IMPL *session) */ __evict_clr_all(session, 0); + /* Clear the current eviction point. */ + page = session->btree->evict_page; + while (page != NULL && !WT_PAGE_IS_ROOT(page)) { + ref = page->ref; + page = page->parent; + if (ref->state == WT_REF_EVICT_WALK) + ref->state = WT_REF_MEM; + } + session->btree->evict_page = NULL; + /* * Wait for LRU eviction activity to drain. It is much easier * to reason about sync or forced eviction if we can be sure @@ -484,22 +495,11 @@ static int __evict_file(WT_SESSION_IMPL *session, WT_EVICT_REQ *er) { WT_PAGE *next_page, *page; - WT_REF *ref; WT_VERBOSE(session, evictserver, "file request: %s", (F_ISSET(er, WT_EVICT_REQ_CLOSE) ? "close" : "sync")); - /* Clear the current eviction point. */ - page = session->btree->evict_page; - while (page != NULL && !WT_PAGE_IS_ROOT(page)) { - ref = page->ref; - page = page->parent; - if (ref->state == WT_REF_EVICT_WALK) - ref->state = WT_REF_MEM; - } - session->btree->evict_page = NULL; - /* * We can't evict the page just returned to us, it marks our place in * the tree. So, always stay one page ahead of the page being returned. |