}
return bug ? -1 : i;
}
-#define CONFIG_DEBUG_MAPLE_TREE
#if defined(CONFIG_DEBUG_MAPLE_TREE)
extern void mt_dump(const struct maple_tree *mt);
}
static void __vma_mt_erase(struct mm_struct *mm, struct vm_area_struct *vma)
{
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
trace___vma_mt_erase(mm, vma);
printk("mt_mod %px, (%px), ERASE, %lu, %lu,", mm, vma, vma->vm_start,
vma->vm_end - 1);
+#endif
mtree_erase(&mm->mm_mt, vma->vm_start);
mt_validate(&mm->mm_mt);
}
static void __vma_mt_szero(struct mm_struct *mm, unsigned long start,
unsigned long end)
{
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
+ trace___vma_mt_szero(mm, start, end);
printk("mt_mod %px, (%px), SNULL, %lu, %lu,", mm, NULL, start,
end - 1);
- trace___vma_mt_szero(mm, start, end);
+#endif
mtree_store_range(&mm->mm_mt, start, end - 1, NULL, GFP_KERNEL);
}
static void __vma_mt_store(struct mm_struct *mm, struct vm_area_struct *vma)
{
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
trace___vma_mt_store(mm, vma);
printk("mt_mod %px, (%px), STORE, %lu, %lu,", mm, vma, vma->vm_start,
vma->vm_end - 1);
+#endif
mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma,
GFP_KERNEL);
mt_validate(&mm->mm_mt);
}
mtree_destroy(&mm->mm_mt);
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
printk("mt_mod %px, (%px), DESTROY", mm, &mm->mm_mt);
+#endif
vm_unacct_memory(nr_accounted);
}