summaryrefslogtreecommitdiffstats
path: root/kernel/mm/workingset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/mm/workingset.c')
-rw-r--r--kernel/mm/workingset.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/mm/workingset.c b/kernel/mm/workingset.c
index 263d01947..6db7b243f 100644
--- a/kernel/mm/workingset.c
+++ b/kernel/mm/workingset.c
@@ -342,21 +342,19 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
* no pages, so we expect to be able to remove them all and
* delete and free the empty node afterwards.
*/
-
- BUG_ON(!node->count);
- BUG_ON(node->count & RADIX_TREE_COUNT_MASK);
+ BUG_ON(!workingset_node_shadows(node));
+ BUG_ON(workingset_node_pages(node));
for (i = 0; i < RADIX_TREE_MAP_SIZE; i++) {
if (node->slots[i]) {
BUG_ON(!radix_tree_exceptional_entry(node->slots[i]));
node->slots[i] = NULL;
- BUG_ON(node->count < (1U << RADIX_TREE_COUNT_SHIFT));
- node->count -= 1U << RADIX_TREE_COUNT_SHIFT;
+ workingset_node_shadows_dec(node);
BUG_ON(!mapping->nrshadows);
mapping->nrshadows--;
}
}
- BUG_ON(node->count);
+ BUG_ON(workingset_node_shadows(node));
inc_zone_state(page_zone(virt_to_page(node)), WORKINGSET_NODERECLAIM);
if (!__radix_tree_delete_node(&mapping->page_tree, node))
BUG();