diff options
author | Keith Bostic <keith@wiredtiger.com> | 2012-03-11 09:44:12 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2012-03-11 09:44:12 -0400 |
commit | bb10cfea02223cfe1262435eee70766081dcbd45 (patch) | |
tree | d7c705c34db7846c2857802238af026ffa4d10c8 | |
parent | 188b952598f5dede9c8c5b411103485bfbdbeef6 (diff) | |
download | mongo-bb10cfea02223cfe1262435eee70766081dcbd45.tar.gz |
tiny code simplification.
-rw-r--r-- | src/session/session_btree.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/session/session_btree.c b/src/session/session_btree.c index 5bc6f4cffe9..8feacf63cb5 100644 --- a/src/session/session_btree.c +++ b/src/session/session_btree.c @@ -39,7 +39,6 @@ __wt_session_lock_btree( WT_BTREE *btree; btree = session->btree; - WT_ASSERT(session, btree != NULL); if (LF_ISSET(WT_BTREE_EXCLUSIVE)) { /* @@ -77,19 +76,18 @@ __wt_session_release_btree(WT_SESSION_IMPL *session) int ret; btree = session->btree; - WT_ASSERT(session, btree != NULL); ret = 0; /* * If we had exclusive access, reopen the tree without special flags so - * that other threads can use it. + * 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)) { WT_ASSERT(session, F_ISSET(btree, WT_BTREE_EXCLUSIVE)); ret = __wt_conn_btree_reopen(session, NULL, 0); - } else if (F_ISSET(btree, WT_BTREE_EXCLUSIVE)) - F_CLR(btree, WT_BTREE_EXCLUSIVE); + } + F_CLR(btree, WT_BTREE_EXCLUSIVE); __wt_rwunlock(session, session->btree->rwlock); |