summaryrefslogtreecommitdiffstats
path: root/mm/fremap.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-01 11:05:59 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-01 11:05:59 -0700
commit0f8b1a0204a12441cddbbf5be31e6338e0b8da1c (patch)
tree7a546266d24908269049bde5cb40aade4b45b06a /mm/fremap.c
parent928c0c1571b004917a989c4d92b09ac129ad68b2 (diff)
parent07961ac7c0ee8b546658717034fe692fd12eefa9 (diff)
downloadlinux-0f8b1a0204a12441cddbbf5be31e6338e0b8da1c.tar.bz2
Merge v3.9-rc5 into driver-core-next
We want the fixes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/fremap.c')
-rw-r--r--mm/fremap.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/mm/fremap.c b/mm/fremap.c
index 4723ac8d2fc2..87da3590c61e 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -204,10 +204,8 @@ get_write_lock:
unsigned long addr;
struct file *file = get_file(vma->vm_file);
- vm_flags = vma->vm_flags;
- if (!(flags & MAP_NONBLOCK))
- vm_flags |= VM_POPULATE;
- addr = mmap_region(file, start, size, vm_flags, pgoff);
+ addr = mmap_region(file, start, size,
+ vma->vm_flags, pgoff);
fput(file);
if (IS_ERR_VALUE(addr)) {
err = addr;
@@ -226,12 +224,6 @@ get_write_lock:
mutex_unlock(&mapping->i_mmap_mutex);
}
- if (!(flags & MAP_NONBLOCK) && !(vma->vm_flags & VM_POPULATE)) {
- if (!has_write_lock)
- goto get_write_lock;
- vma->vm_flags |= VM_POPULATE;
- }
-
if (vma->vm_flags & VM_LOCKED) {
/*
* drop PG_Mlocked flag for over-mapped range