diff options
| author | Matthew Garrett <mjg@redhat.com> | 2010-05-17 12:11:21 -0400 |
|---|---|---|
| committer | Matthew Garrett <mjg@redhat.com> | 2010-05-17 12:11:21 -0400 |
| commit | a1e66dd0515c8cfa72b8e2a3834d59548cf84ba5 (patch) | |
| tree | e1e1edf210c8dde6edbdfa32ed6ff59ac553729b /mm/rmap.c | |
| parent | d89d63a973986bf6c1d8b28ab62eb61491a3bb34 (diff) | |
| parent | 6c62673cf58516e1b82329ac90ebf3ff3f485672 (diff) | |
Merge branch 'x86-platform-next' into x86-platform
Diffstat (limited to 'mm/rmap.c')
| -rw-r--r-- | mm/rmap.c | 9 |
1 files changed, 4 insertions, 5 deletions
| @@ -336,14 +336,13 @@ vma_address(struct page *page, struct vm_area_struct *vma) | |||
| 336 | 336 | ||
| 337 | /* | 337 | /* |
| 338 | * At what user virtual address is page expected in vma? | 338 | * At what user virtual address is page expected in vma? |
| 339 | * checking that the page matches the vma. | 339 | * Caller should check the page is actually part of the vma. |
| 340 | */ | 340 | */ |
| 341 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) | 341 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) |
| 342 | { | 342 | { |
| 343 | if (PageAnon(page)) { | 343 | if (PageAnon(page)) |
| 344 | if (vma->anon_vma != page_anon_vma(page)) | 344 | ; |
| 345 | return -EFAULT; | 345 | else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { |
| 346 | } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { | ||
| 347 | if (!vma->vm_file || | 346 | if (!vma->vm_file || |
| 348 | vma->vm_file->f_mapping != page->mapping) | 347 | vma->vm_file->f_mapping != page->mapping) |
| 349 | return -EFAULT; | 348 | return -EFAULT; |
