diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-03-12 15:31:50 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-03-12 15:31:50 +1100 |
commit | 2415464ddb3cc5b4815d32ab79839c1469a68f8f (patch) | |
tree | f28b7aa7f942e946d84e99dcf2ce7e628d56900f | |
parent | 8171b9fda5dd3939d17f414f136ce5f8fbcae075 (diff) | |
download | mongo-2415464ddb3cc5b4815d32ab79839c1469a68f8f.tar.gz |
Revert a comment, only clear the exclusive flag if it was set.
-rw-r--r-- | src/session/session_btree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/session/session_btree.c b/src/session/session_btree.c index 26b2509664f..6cec54874f2 100644 --- a/src/session/session_btree.c +++ b/src/session/session_btree.c @@ -83,10 +83,8 @@ __wt_session_release_btree(WT_SESSION_IMPL *session) ret = 0; /* - * If we had exclusive access, close the handle so that other threads - * can use it (the next thread to access the handle will open it with - * any special flags as required. The handle stays in our cache, so - * we don't want to go through __wt_conn_btree_close. + * If we had exclusive access, reopen the tree without special flags so + * that other threads can use it (note the reopen call sets the flags). */ if (F_ISSET(btree, WT_BTREE_BULK | WT_BTREE_SALVAGE | WT_BTREE_UPGRADE | WT_BTREE_VERIFY)) { @@ -94,7 +92,9 @@ __wt_session_release_btree(WT_SESSION_IMPL *session) ret = __wt_conn_btree_reopen(session, NULL, 0); } - F_CLR(btree, WT_BTREE_EXCLUSIVE); + if (F_ISSET(btree, WT_BTREE_EXCLUSIVE)) + F_CLR(btree, WT_BTREE_EXCLUSIVE); + __wt_rwunlock(session, btree->rwlock); return (ret); |