aboutsummaryrefslogtreecommitdiffstats
path: root/mm/workingset.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/workingset.c')
-rw-r--r--mm/workingset.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/workingset.c b/mm/workingset.c
index 69551cfae97b..617475f529f4 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -418,21 +418,19 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
418 * no pages, so we expect to be able to remove them all and 418 * no pages, so we expect to be able to remove them all and
419 * delete and free the empty node afterwards. 419 * delete and free the empty node afterwards.
420 */ 420 */
421 421 BUG_ON(!workingset_node_shadows(node));
422 BUG_ON(!node->count); 422 BUG_ON(workingset_node_pages(node));
423 BUG_ON(node->count & RADIX_TREE_COUNT_MASK);
424 423
425 for (i = 0; i < RADIX_TREE_MAP_SIZE; i++) { 424 for (i = 0; i < RADIX_TREE_MAP_SIZE; i++) {
426 if (node->slots[i]) { 425 if (node->slots[i]) {
427 BUG_ON(!radix_tree_exceptional_entry(node->slots[i])); 426 BUG_ON(!radix_tree_exceptional_entry(node->slots[i]));
428 node->slots[i] = NULL; 427 node->slots[i] = NULL;
429 BUG_ON(node->count < (1U << RADIX_TREE_COUNT_SHIFT)); 428 workingset_node_shadows_dec(node);
430 node->count -= 1U << RADIX_TREE_COUNT_SHIFT;
431 BUG_ON(!mapping->nrexceptional); 429 BUG_ON(!mapping->nrexceptional);
432 mapping->nrexceptional--; 430 mapping->nrexceptional--;
433 } 431 }
434 } 432 }
435 BUG_ON(node->count); 433 BUG_ON(workingset_node_shadows(node));
436 inc_node_state(page_pgdat(virt_to_page(node)), WORKINGSET_NODERECLAIM); 434 inc_node_state(page_pgdat(virt_to_page(node)), WORKINGSET_NODERECLAIM);
437 if (!__radix_tree_delete_node(&mapping->page_tree, node)) 435 if (!__radix_tree_delete_node(&mapping->page_tree, node))
438 BUG(); 436 BUG();