]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/mm.h
procfs: introduce the /proc/<pid>/map_files/ directory
[karo-tx-linux.git] / include / linux / mm.h
index 4baadd18f4ad3402f47fbd2ac919bafba519bed4..5953422fb53ce827c091976c81bf6cf61a234b7a 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