Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232703
b: refs/heads/master
c: fdf4c58
h: refs/heads/master
i:
  232701: 1028480
  232699: 2455af4
  232695: 4ead36c
  232687: 6fb5aed
  232671: a047710
  232639: 48c56eb
  232575: e24fe51
  232447: c9e3efa
v: v3
  • Loading branch information
Michel Lespinasse authored and Linus Torvalds committed Feb 1, 2011
1 parent 83c7b36 commit 6dae695
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69bc70d4f97ce82153bed0afc9f432700c60390b
refs/heads/master: fdf4c587a793ba87935e38e7f25a9540bc9a7b95
7 changes: 7 additions & 0 deletions trunk/mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
if ((vma->vm_flags & (VM_WRITE | VM_SHARED)) == VM_WRITE)
gup_flags |= FOLL_WRITE;

/*
* We want mlock to succeed for regions that have any permissions
* other than PROT_NONE.
*/
if (vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC))
gup_flags |= FOLL_FORCE;

if (vma->vm_flags & VM_LOCKED)
gup_flags |= FOLL_MLOCK;

Expand Down

0 comments on commit 6dae695

Please sign in to comment.