Using BUG_ON() as an assert() is _never_ acceptable
[deliverable/linux.git] / include / linux / swap.h
index b17cc4830fa670512abdc3987f58fc55e583f0bc..e1d761463243822fef21e619bf0310c0ce36db80 100644 (file)
@@ -257,6 +257,7 @@ static inline void workingset_node_pages_inc(struct radix_tree_node *node)
 
 static inline void workingset_node_pages_dec(struct radix_tree_node *node)
 {
+       VM_WARN_ON_ONCE(!workingset_node_pages(node));
        node->count--;
 }
 
@@ -272,6 +273,7 @@ static inline void workingset_node_shadows_inc(struct radix_tree_node *node)
 
 static inline void workingset_node_shadows_dec(struct radix_tree_node *node)
 {
+       VM_WARN_ON_ONCE(!workingset_node_shadows(node));
        node->count -= 1U << RADIX_TREE_COUNT_SHIFT;
 }
 
This page took 0.025144 seconds and 5 git commands to generate.