diff options
author | Rik van Riel <riel@redhat.com> | 2014-08-06 16:08:12 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-06 18:01:22 -0700 |
commit | dbffcd03d77a3fb4d80a7981c7e589fc35769e9b (patch) | |
tree | e2171f64cbcc6f03ef4f56cf21b644df73782ae0 /mm/memory.c | |
parent | 68b5a652485682f67eacdee3deae640fb7845b63 (diff) | |
download | linux-dbffcd03d77a3fb4d80a7981c7e589fc35769e9b.tar.gz linux-dbffcd03d77a3fb4d80a7981c7e589fc35769e9b.tar.bz2 linux-dbffcd03d77a3fb4d80a7981c7e589fc35769e9b.zip |
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=81651
Signed-off-by: Rik van Riel <riel@redhat.com>
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 5596d77e8656..5c55270729f7 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -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, write, 1, &page, &vma); if (ret <= 0) { +#ifndef CONFIG_HAVE_IOREMAP_PROT + break; +#else /* * Check if this is a VM_IO | VM_PFNMAP VMA, which * we can access using slightly different code. */ -#ifdef CONFIG_HAVE_IOREMAP_PROT vma = find_vma(mm, addr); if (!vma || vma->vm_start > addr) break; @@ -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, len, write); if (ret <= 0) -#endif break; bytes = ret; +#endif } else { bytes = len; offset = addr & (PAGE_SIZE-1); |