summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/schema/schema_truncate.c
diff options
context:
space:
mode:
authorMatt Kangas <matt.kangas@mongodb.com>2014-11-18 23:17:10 -0500
committerMatt Kangas <matt.kangas@mongodb.com>2014-11-19 08:34:34 -0500
commitb1be46d80c999a4a583dd55dff5da42b28480f15 (patch)
treea3ec195919f882417e50a67c380a5e2ff73eea5f /src/third_party/wiredtiger/src/schema/schema_truncate.c
parent42d25fc0fd25d59fb2b2f29f79f09cb4f7f623c6 (diff)
downloadmongo-b1be46d80c999a4a583dd55dff5da42b28480f15.tar.gz
Import wiredtiger-wiredtiger-2.4.0-385-g35c6df1.tar.gz from wiredtiger branch mongodb-2.8
Diffstat (limited to 'src/third_party/wiredtiger/src/schema/schema_truncate.c')
-rw-r--r--src/third_party/wiredtiger/src/schema/schema_truncate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/schema/schema_truncate.c b/src/third_party/wiredtiger/src/schema/schema_truncate.c
index 1da3b103f10..6fca7628cae 100644
--- a/src/third_party/wiredtiger/src/schema/schema_truncate.c
+++ b/src/third_party/wiredtiger/src/schema/schema_truncate.c
@@ -14,6 +14,7 @@
static int
__truncate_file(WT_SESSION_IMPL *session, const char *name)
{
+ WT_DECL_RET;
const char *filename;
uint32_t allocsize;
@@ -31,7 +32,9 @@ __truncate_file(WT_SESSION_IMPL *session, const char *name)
WT_RET(__wt_session_release_btree(session));
/* Close any btree handles in the file. */
- WT_RET(__wt_conn_dhandle_close_all(session, name, 0));
+ WT_WITH_DHANDLE_LOCK(session,
+ ret = __wt_conn_dhandle_close_all(session, name, 0));
+ WT_RET(ret);
/* Delete the root address and truncate the file. */
WT_RET(__wt_meta_checkpoint_clear(session, name));