diff options
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 3b90086e85a2..386443e9d2c6 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -176,7 +176,6 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
176 | int i; | 176 | int i; |
177 | int write = !!(flags & GUP_FLAGS_WRITE); | 177 | int write = !!(flags & GUP_FLAGS_WRITE); |
178 | int force = !!(flags & GUP_FLAGS_FORCE); | 178 | int force = !!(flags & GUP_FLAGS_FORCE); |
179 | int ignore = !!(flags & GUP_FLAGS_IGNORE_VMA_PERMISSIONS); | ||
180 | 179 | ||
181 | /* calculate required read or write permissions. | 180 | /* calculate required read or write permissions. |
182 | * - if 'force' is set, we only require the "MAY" flags. | 181 | * - if 'force' is set, we only require the "MAY" flags. |
@@ -190,8 +189,8 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
190 | goto finish_or_fault; | 189 | goto finish_or_fault; |
191 | 190 | ||
192 | /* protect what we can, including chardevs */ | 191 | /* protect what we can, including chardevs */ |
193 | if (vma->vm_flags & (VM_IO | VM_PFNMAP) || | 192 | if ((vma->vm_flags & (VM_IO | VM_PFNMAP)) || |
194 | (!ignore && !(vm_flags & vma->vm_flags))) | 193 | !(vm_flags & vma->vm_flags)) |
195 | goto finish_or_fault; | 194 | goto finish_or_fault; |
196 | 195 | ||
197 | if (pages) { | 196 | if (pages) { |
@@ -210,7 +209,6 @@ finish_or_fault: | |||
210 | return i ? : -EFAULT; | 209 | return i ? : -EFAULT; |
211 | } | 210 | } |
212 | 211 | ||
213 | |||
214 | /* | 212 | /* |
215 | * get a list of pages in an address range belonging to the specified process | 213 | * get a list of pages in an address range belonging to the specified process |
216 | * and indicate the VMA that covers each page | 214 | * and indicate the VMA that covers each page |