diff options
author | Dan Pasette <dan@10gen.com> | 2015-02-24 07:29:38 -0500 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2015-02-24 07:37:03 -0500 |
commit | 4a8b10a7bb9154c19b8a60cbda7b2f5d8f6b3d44 (patch) | |
tree | 92b81e2078786e72221a02ab9180374b672d06d4 /src/third_party/wiredtiger/src/evict/evict_file.c | |
parent | c614b21cc563dbb400f7258124fc5d2ed58b4dce (diff) | |
download | mongo-4a8b10a7bb9154c19b8a60cbda7b2f5d8f6b3d44.tar.gz |
Import wiredtiger-wiredtiger-mongodb-3.0-rc10-4-g03cb722.tar.gz from wiredtiger branch mongodb-3.0
Diffstat (limited to 'src/third_party/wiredtiger/src/evict/evict_file.c')
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_file.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/third_party/wiredtiger/src/evict/evict_file.c b/src/third_party/wiredtiger/src/evict/evict_file.c index 910aef070ca..9e39fcc7a2c 100644 --- a/src/third_party/wiredtiger/src/evict/evict_file.c +++ b/src/third_party/wiredtiger/src/evict/evict_file.c @@ -15,21 +15,16 @@ int __wt_evict_file(WT_SESSION_IMPL *session, int syncop) { - WT_BTREE *btree; WT_DECL_RET; WT_PAGE *page; WT_REF *next_ref, *ref; - int eviction_enabled; - - btree = S2BT(session); - eviction_enabled = !F_ISSET(btree, WT_BTREE_NO_EVICTION); + int evict_reset; /* * We need exclusive access to the file -- disable ordinary eviction * and drain any blocks already queued. */ - if (eviction_enabled) - WT_RET(__wt_evict_file_exclusive_on(session)); + WT_RET(__wt_evict_file_exclusive_on(session, &evict_reset)); /* Make sure the oldest transaction ID is up-to-date. */ __wt_txn_update_oldest(session); @@ -140,7 +135,7 @@ err: /* On error, clear any left-over tree walk. */ session, next_ref, WT_READ_NO_EVICT)); } - if (eviction_enabled) + if (evict_reset) __wt_evict_file_exclusive_off(session); return (ret); |