From: David Howells The attached patch implements a nommu version of find_vma(). Signed-Off-By: David Howells Signed-off-by: Andrew Morton --- 25-akpm/mm/nommu.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletion(-) diff -puN mm/nommu.c~implement-nommu-find_vma mm/nommu.c --- 25/mm/nommu.c~implement-nommu-find_vma Thu Dec 16 15:21:46 2004 +++ 25-akpm/mm/nommu.c Thu Dec 16 15:21:46 2004 @@ -793,11 +793,22 @@ unsigned long do_mremap(unsigned long ad return vml->vma->vm_start; } -struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr) +/* + * Look up the first VMA which satisfies addr < vm_end, NULL if none + */ +struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) { + struct vm_list_struct *vml; + + for (vml = mm->context.vmlist; vml; vml = vml->next) + if (addr >= vml->vma->vm_start && addr < vml->vma->vm_end) + return vml->vma; + return NULL; } +EXPORT_SYMBOL(find_vma); + struct page * follow_page(struct mm_struct *mm, unsigned long addr, int write) { return NULL; _