|
@@ -43,6 +43,11 @@ int do_swap_page(struct vm_fault *vmf);
|
|
|
void free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *start_vma,
|
|
|
unsigned long floor, unsigned long ceiling);
|
|
|
|
|
|
+static inline bool can_madv_dontneed_vma(struct vm_area_struct *vma)
|
|
|
+{
|
|
|
+ return !(vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_PFNMAP));
|
|
|
+}
|
|
|
+
|
|
|
void unmap_page_range(struct mmu_gather *tlb,
|
|
|
struct vm_area_struct *vma,
|
|
|
unsigned long addr, unsigned long end,
|