procfs: introduce the /proc/<pid>/map_files/ directory
[pandora-kernel.git] / include / linux / mm.h
index ca9ab9f..a4422c3 100644 (file)
@@ -1492,6 +1492,18 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
        return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
 }
 
+/* Look up the first VMA which exactly match the interval vm_start ... vm_end */
+static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
+                               unsigned long vm_start, unsigned long vm_end)
+{
+       struct vm_area_struct *vma = find_vma(mm, vm_start);
+
+       if (vma && (vma->vm_start != vm_start || vma->vm_end != vm_end))
+               vma = NULL;
+
+       return vma;
+}
+
 #ifdef CONFIG_MMU
 pgprot_t vm_get_page_prot(unsigned long vm_flags);
 #else