summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-02-18 13:41:53 -0500
committerKeith Bostic <keith@wiredtiger.com>2015-02-18 13:41:53 -0500
commit3049855ab22bf6e18f375846d9d12496a8a818b3 (patch)
tree1a3a1a7eb2346e6224fca398c090d8710320a306
parent2de864a1a95dc2b68d6e072ffddcbb247e2bead9 (diff)
downloadmongo-3049855ab22bf6e18f375846d9d12496a8a818b3.tar.gz
Whitespace, use WT_PAGE_IS_INTERNAL instead of enumerating leaf page
types, simplify return pattern.
-rw-r--r--src/btree/bt_page.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/btree/bt_page.c b/src/btree/bt_page.c
index c64ad6bae8d..2f2ce4cf4f7 100644
--- a/src/btree/bt_page.c
+++ b/src/btree/bt_page.c
@@ -32,14 +32,11 @@ __evict_force_check(WT_SESSION_IMPL *session, WT_PAGE *page, uint32_t flags)
return (0);
/* Leaf pages only. */
- if (page->type != WT_PAGE_COL_FIX &&
- page->type != WT_PAGE_COL_VAR &&
- page->type != WT_PAGE_ROW_LEAF)
+ if (WT_PAGE_IS_INTERNAL(page))
return (0);
/* Eviction may be turned off. */
- if (LF_ISSET(WT_READ_NO_EVICT) ||
- F_ISSET(btree, WT_BTREE_NO_EVICTION))
+ if (LF_ISSET(WT_READ_NO_EVICT) || F_ISSET(btree, WT_BTREE_NO_EVICTION))
return (0);
/*
@@ -53,10 +50,7 @@ __evict_force_check(WT_SESSION_IMPL *session, WT_PAGE *page, uint32_t flags)
__wt_page_evict_soon(page);
/* If eviction cannot succeed, don't try. */
- if (!__wt_page_can_evict(session, page, 1))
- return (0);
-
- return (1);
+ return (__wt_page_can_evict(session, page, 1));
}
/*