diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-26 12:26:48 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-05-26 12:26:48 +1000 |
commit | 472dbce7e580fe9155738e36a8dc28132a119d77 (patch) | |
tree | 917be623440c9379245d050c5f684fe3c76d6cb1 | |
parent | b77b91863da06bb814de73537ece87fc2076b439 (diff) | |
parent | 7faa8d65f8f18284750ede708bcb3c0d9dbe73b6 (diff) | |
download | mongo-472dbce7e580fe9155738e36a8dc28132a119d77.tar.gz |
Merge branch 'mongodb-3.0' of github.com:wiredtiger/wiredtiger into mongodb-3.0mongodb-3.0.4
-rw-r--r-- | src/lsm/lsm_work_unit.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/lsm/lsm_work_unit.c b/src/lsm/lsm_work_unit.c index 15ba07664cc..0566e0abc70 100644 --- a/src/lsm/lsm_work_unit.c +++ b/src/lsm/lsm_work_unit.c @@ -446,11 +446,11 @@ err: if (bloom != NULL) } /* - * __lsm_discard_handle -- - * Try to discard a handle from cache. + * __lsm_discard_handle_internal -- + * Try to discard a handle from cache (locked version). */ static int -__lsm_discard_handle( +__lsm_discard_handle_internal( WT_SESSION_IMPL *session, const char *uri, const char *checkpoint) { /* This will fail with EBUSY if the file is still in use. */ @@ -462,6 +462,23 @@ __lsm_discard_handle( } /* + * __lsm_discard_handle -- + * Try to discard a handle from cache. + */ +static int +__lsm_discard_handle( + WT_SESSION_IMPL *session, const char *uri, const char *checkpoint) +{ + WT_DECL_RET; + + WT_WITH_SCHEMA_LOCK(session, + WT_WITH_DHANDLE_LOCK(session, + ret = __lsm_discard_handle_internal(session, uri, checkpoint))); + + return (ret); +} + +/* * __lsm_drop_file -- * Helper function to drop part of an LSM tree. */ |