gfp_t gfp_mask;
};
+
+/*
+ * vma_mas_store() - Store a VMA in the maple tree.
+ * @vma: The vm_area_struct
+ * @mas: The maple state
+ *
+ * Efficient way to store a VMA in the maple tree when the @mas has already
+ * walked to the correct location.
+ *
+ * Note: the end address is inclusive in the maple tree.
+ */
+static inline int vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+{
+ mas->index = vma->vm_start;
+ mas->last = vma->vm_end - 1;
+ return mas_store_gfp(mas, vma, GFP_KERNEL);
+}
+
+/*
+ * vma_mas_remove() - Remove a VMA from the maple tree.
+ * @vma: The vm_area_struct
+ * @mas: The maple state
+ *
+ * Efficient way to remove a VMA from the maple tree when the @mas has already
+ * been established and points to the correct location.
+ * Note: the end address is inclusive in the maple tree.
+ */
+static inline int vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+{
+ mas->index = vma->vm_start;
+ mas->last = vma->vm_end - 1;
+ return mas_store_gfp(mas, NULL, GFP_KERNEL);
+}
+
+/*
+ * vma_mt_szero() - Set a given range to zero. Used when modifying a
+ * vm_area_struct start or end.
+ *
+ * @mm: The struct_mm
+ * @start: The start address to zero
+ * @end: The end address to zero.
+ */
+static inline void vma_mt_szero(struct mm_struct *mm, unsigned long start,
+ unsigned long end)
+{
+ trace_vma_mt_szero(mm, start, end);
+ mtree_store_range(&mm->mm_mt, start, end - 1, NULL, GFP_KERNEL);
+}
+
+/*
+ * vma_mt_store() - Store a given vm_area_struct in the maple tree.
+ *
+ * @mm: The struct_mm
+ * @vma: The vm_area_struct to store in the maple tree.
+ */
+static inline void vma_mt_store(struct mm_struct *mm, struct vm_area_struct *vma)
+{
+ trace_vma_mt_store(mm, vma);
+ mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma,
+ GFP_KERNEL);
+}
+
+
#endif /* __MM_INTERNAL_H */
}
}
-/*
- * vma_mas_store() - Store a VMA in the maple tree.
- * @vma: The vm_area_struct
- * @mas: The maple state
- *
- * Efficient way to store a VMA in the maple tree when the @mas has already
- * walked to the correct location.
- *
- * Note: the end address is inclusive in the maple tree.
- */
-static inline int vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
-{
- mas->index = vma->vm_start;
- mas->last = vma->vm_end - 1;
- return mas_store_gfp(mas, vma, GFP_KERNEL);
-}
-
-/*
- * vma_mas_remove() - Remove a VMA from the maple tree.
- * @vma: The vm_area_struct
- * @mas: The maple state
- *
- * Efficient way to remove a VMA from the maple tree when the @mas has already
- * been established and points to the correct location.
- * Note: the end address is inclusive in the maple tree.
- */
-static inline int vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
-{
- mas->index = vma->vm_start;
- mas->last = vma->vm_end - 1;
- return mas_store_gfp(mas, NULL, GFP_KERNEL);
-}
-
-/*
- * vma_mt_szero() - Set a given range to zero. Used when modifying a
- * vm_area_struct start or end.
- *
- * @mm: The struct_mm
- * @start: The start address to zero
- * @end: The end address to zero.
- */
-static inline void vma_mt_szero(struct mm_struct *mm, unsigned long start,
- unsigned long end)
-{
- trace_vma_mt_szero(mm, start, end);
- mtree_store_range(&mm->mm_mt, start, end - 1, NULL, GFP_KERNEL);
-}
-
-/*
- * vma_mt_store() - Store a given vm_area_struct in the maple tree.
- *
- * @mm: The struct_mm
- * @vma: The vm_area_struct to store in the maple tree.
- */
-static inline void vma_mt_store(struct mm_struct *mm, struct vm_area_struct *vma)
-{
- trace_vma_mt_store(mm, vma);
- mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma,
- GFP_KERNEL);
-}
-
-
static void vma_mas_link(struct mm_struct *mm, struct vm_area_struct *vma,
struct ma_state *mas)
{