summaryrefslogtreecommitdiff
path: root/src/meta
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-12-04 14:49:59 -0500
committerKeith Bostic <keith@wiredtiger.com>2013-12-04 14:49:59 -0500
commite16a913fc6ea1e7325ccdbf0dc83f377853e2eb0 (patch)
tree880778625b4b17a87b290a2d8902df60e3db9057 /src/meta
parentdda8ac0d30eb58fe807c103227bca96813e987ae (diff)
downloadmongo-e16a913fc6ea1e7325ccdbf0dc83f377853e2eb0.tar.gz
Abstract out the data source in-use increment/decrement so we don't have
a random ATOMIC_ADD call in the metadata cursor code.
Diffstat (limited to 'src/meta')
-rw-r--r--src/meta/meta_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/meta/meta_table.c b/src/meta/meta_table.c
index da46260d03c..05723cc4aa5 100644
--- a/src/meta/meta_table.c
+++ b/src/meta/meta_table.c
@@ -66,12 +66,12 @@ __wt_metadata_cursor(
WT_SET_BTREE_IN_SESSION(session, session->metafile);
- /*
- * XXX: why not call __wt_session_get_btree()?
- * Increment the data-source use count.
+ /*
+ * We use the metadata a lot, so we have a handle cached; lock it and
+ * increment the in-use counter.
*/
WT_ERR(__wt_session_lock_btree(session, 0));
- (void)WT_ATOMIC_ADD(session->dhandle->session_inuse, 1);
+ __wt_session_dhandle_incr_use(session);
ret = __wt_curfile_create(session, NULL, cfg, 0, 0, cursorp);