diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -2358,11 +2358,17 @@ int mm_take_all_locks(struct mm_struct *mm) | |||
2358 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | 2358 | for (vma = mm->mmap; vma; vma = vma->vm_next) { |
2359 | if (signal_pending(current)) | 2359 | if (signal_pending(current)) |
2360 | goto out_unlock; | 2360 | goto out_unlock; |
2361 | if (vma->anon_vma) | ||
2362 | vm_lock_anon_vma(mm, vma->anon_vma); | ||
2363 | if (vma->vm_file && vma->vm_file->f_mapping) | 2361 | if (vma->vm_file && vma->vm_file->f_mapping) |
2364 | vm_lock_mapping(mm, vma->vm_file->f_mapping); | 2362 | vm_lock_mapping(mm, vma->vm_file->f_mapping); |
2365 | } | 2363 | } |
2364 | |||
2365 | for (vma = mm->mmap; vma; vma = vma->vm_next) { | ||
2366 | if (signal_pending(current)) | ||
2367 | goto out_unlock; | ||
2368 | if (vma->anon_vma) | ||
2369 | vm_lock_anon_vma(mm, vma->anon_vma); | ||
2370 | } | ||
2371 | |||
2366 | ret = 0; | 2372 | ret = 0; |
2367 | 2373 | ||
2368 | out_unlock: | 2374 | out_unlock: |