Commit dbffcd03 authored by Rik van Riel's avatar Rik van Riel Committed by Linus Torvalds

mm: change confusing #ifdef use in __access_remote_vm

This patch changes confusing #ifdef use in __access_remote_vm into
merely ugly #ifdef use.

Addresses bug https://bugzilla.kernel.org/show_bug.cgi?id=81651Signed-off-by: default avatarRik van Riel <riel@redhat.com>
Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 68b5a652
...@@ -3613,11 +3613,13 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, ...@@ -3613,11 +3613,13 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
ret = get_user_pages(tsk, mm, addr, 1, ret = get_user_pages(tsk, mm, addr, 1,
write, 1, &page, &vma); write, 1, &page, &vma);
if (ret <= 0) { if (ret <= 0) {
#ifndef CONFIG_HAVE_IOREMAP_PROT
break;
#else
/* /*
* Check if this is a VM_IO | VM_PFNMAP VMA, which * Check if this is a VM_IO | VM_PFNMAP VMA, which
* we can access using slightly different code. * we can access using slightly different code.
*/ */
#ifdef CONFIG_HAVE_IOREMAP_PROT
vma = find_vma(mm, addr); vma = find_vma(mm, addr);
if (!vma || vma->vm_start > addr) if (!vma || vma->vm_start > addr)
break; break;
...@@ -3625,9 +3627,9 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, ...@@ -3625,9 +3627,9 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
ret = vma->vm_ops->access(vma, addr, buf, ret = vma->vm_ops->access(vma, addr, buf,
len, write); len, write);
if (ret <= 0) if (ret <= 0)
#endif
break; break;
bytes = ret; bytes = ret;
#endif
} else { } else {
bytes = len; bytes = len;
offset = addr & (PAGE_SIZE-1); offset = addr & (PAGE_SIZE-1);
......
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