Commit 9a9474d9 authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] Implement nommu find_vma()

The attached patch implements a nommu version of find_vma().
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9f7d59c7
......@@ -793,11 +793,22 @@ unsigned long do_mremap(unsigned long addr,
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment