diff options
Diffstat (limited to 'mm/fremap.c')
-rw-r--r-- | mm/fremap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mm/fremap.c b/mm/fremap.c index d862be3bc3e3..007cbad9331e 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -65,7 +65,7 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
65 | pte_t pte_val; | 65 | pte_t pte_val; |
66 | spinlock_t *ptl; | 66 | spinlock_t *ptl; |
67 | 67 | ||
68 | BUG_ON(vma->vm_flags & VM_RESERVED); | 68 | BUG_ON(vma->vm_flags & VM_UNPAGED); |
69 | 69 | ||
70 | pgd = pgd_offset(mm, addr); | 70 | pgd = pgd_offset(mm, addr); |
71 | pud = pud_alloc(mm, pgd, addr); | 71 | pud = pud_alloc(mm, pgd, addr); |
@@ -122,7 +122,7 @@ int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, | |||
122 | pte_t pte_val; | 122 | pte_t pte_val; |
123 | spinlock_t *ptl; | 123 | spinlock_t *ptl; |
124 | 124 | ||
125 | BUG_ON(vma->vm_flags & VM_RESERVED); | 125 | BUG_ON(vma->vm_flags & VM_UNPAGED); |
126 | 126 | ||
127 | pgd = pgd_offset(mm, addr); | 127 | pgd = pgd_offset(mm, addr); |
128 | pud = pud_alloc(mm, pgd, addr); | 128 | pud = pud_alloc(mm, pgd, addr); |
@@ -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) { |