diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-12-04 14:49:59 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-12-04 14:49:59 -0500 |
commit | e16a913fc6ea1e7325ccdbf0dc83f377853e2eb0 (patch) | |
tree | 880778625b4b17a87b290a2d8902df60e3db9057 /src/meta | |
parent | dda8ac0d30eb58fe807c103227bca96813e987ae (diff) | |
download | mongo-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.c | 8 |
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); |