aboutsummaryrefslogtreecommitdiffstats
path: root/mm/fremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/fremap.c')
-rw-r--r--mm/fremap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/fremap.c b/mm/fremap.c
index 94254c5d7a18..007cbad9331e 100644
--- a/mm/fremap.c
+++ b/mm/fremap.c
@@ -204,12 +204,10 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
204 * Make sure the vma is shared, that it supports prefaulting, 204 * Make sure the vma is shared, that it supports prefaulting,
205 * and that the remapped range is valid and fully within 205 * and that the remapped range is valid and fully within
206 * the single existing vma. vm_private_data is used as a 206 * the single existing vma. vm_private_data is used as a
207 * swapout cursor in a VM_NONLINEAR vma (unless VM_RESERVED 207 * swapout cursor in a VM_NONLINEAR vma.
208 * or VM_LOCKED, but VM_LOCKED could be revoked later on).
209 */ 208 */
210 if (vma && (vma->vm_flags & VM_SHARED) && 209 if (vma && (vma->vm_flags & VM_SHARED) &&
211 (!vma->vm_private_data || 210 (!vma->vm_private_data || (vma->vm_flags & VM_NONLINEAR)) &&
212 (vma->vm_flags & (VM_NONLINEAR|VM_RESERVED))) &&
213 vma->vm_ops && vma->vm_ops->populate && 211 vma->vm_ops && vma->vm_ops->populate &&
214 end > start && start >= vma->vm_start && 212 end > start && start >= vma->vm_start &&
215 end <= vma->vm_end) { 213 end <= vma->vm_end) {