diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-06-01 22:52:34 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-06-01 22:52:34 +1000 |
commit | e8cf23c09bfde94a3d2ecfb9033126a48b52d394 (patch) | |
tree | d25d515ccb4951ef0519065c6701065e3eb5eb07 /src/meta/meta_apply.c | |
parent | 177a0a0f073775af95391ee915f7232fb875fa41 (diff) | |
download | mongo-e8cf23c09bfde94a3d2ecfb9033126a48b52d394.tar.gz |
Add handle locking to create and drop operations to avoid races.
closes #191
Diffstat (limited to 'src/meta/meta_apply.c')
-rw-r--r-- | src/meta/meta_apply.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/meta/meta_apply.c b/src/meta/meta_apply.c index 8b2053151c0..793582261e4 100644 --- a/src/meta/meta_apply.c +++ b/src/meta/meta_apply.c @@ -34,9 +34,9 @@ __wt_meta_btree_apply(WT_SESSION_IMPL *session, else if (strcmp(uri, WT_METADATA_URI) == 0) continue; WT_ERR(__wt_session_get_btree(session, uri, NULL, flags)); - WT_ERR(func(session, cfg)); - if (!LF_ISSET(WT_BTREE_NO_LOCK)) - WT_ERR(__wt_session_release_btree(session)); + ret = func(session, cfg); + WT_TRET(__wt_session_release_btree(session)); + WT_ERR(ret); } if (tret != WT_NOTFOUND) |