Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186191
b: refs/heads/master
c: c58267c
h: refs/heads/master
i:
  186189: 2a8ffd0
  186187: 9c8de9a
  186183: 26f6afb
  186175: 237ac15
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Mar 6, 2010
1 parent 6a988da commit e60fd89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b084d4353ff99d824d3bc5a5c2c22c70b1fba722
refs/heads/master: c58267c32429ea6535428ca6b8a036892c1697f2
11 changes: 2 additions & 9 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1265,12 +1265,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
mm->total_vm += len >> PAGE_SHIFT;
vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
if (vm_flags & VM_LOCKED) {
/*
* makes pages present; downgrades, drops, reacquires mmap_sem
*/
long nr_pages = mlock_vma_pages_range(vma, addr, addr + len);
if (nr_pages < 0)
return nr_pages; /* vma gone! */
mm->locked_vm += (len >> PAGE_SHIFT) - nr_pages;
} else if ((flags & MAP_POPULATE) && !(flags & MAP_NONBLOCK))
make_pages_present(addr, addr + len);
Expand Down Expand Up @@ -1754,8 +1749,7 @@ find_extend_vma(struct mm_struct *mm, unsigned long addr)
if (!prev || expand_stack(prev, addr))
return NULL;
if (prev->vm_flags & VM_LOCKED) {
if (mlock_vma_pages_range(prev, addr, prev->vm_end) < 0)
return NULL; /* vma gone! */
mlock_vma_pages_range(prev, addr, prev->vm_end);
}
return prev;
}
Expand Down Expand Up @@ -1783,8 +1777,7 @@ find_extend_vma(struct mm_struct * mm, unsigned long addr)
if (expand_stack(vma, addr))
return NULL;
if (vma->vm_flags & VM_LOCKED) {
if (mlock_vma_pages_range(vma, addr, start) < 0)
return NULL; /* vma gone! */
mlock_vma_pages_range(vma, addr, start);
}
return vma;
}
Expand Down

0 comments on commit e60fd89

Please sign in to comment.