diff options
-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. */ |