Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272168
b: refs/heads/master
c: 3d470fc
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Nov 1, 2011
1 parent 076aa0a commit 4b8708e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 35d8c7ad7208dad5d352c483408e555022750978
refs/heads/master: 3d470fc385defa60d9af610f05db8e7f8b4f2f5e
10 changes: 9 additions & 1 deletion trunk/mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ void munlock_vma_page(struct page *page)
if (TestClearPageMlocked(page)) {
dec_zone_page_state(page, NR_MLOCK);
if (!isolate_lru_page(page)) {
int ret = try_to_munlock(page);
int ret = SWAP_AGAIN;

/*
* Optimization: if the page was mapped just once,
* that's our mapping and we don't need to check all the
* other vmas.
*/
if (page_mapcount(page) > 1)
ret = try_to_munlock(page);
/*
* did try_to_unlock() succeed or punt?
*/
Expand Down

0 comments on commit 4b8708e

Please sign in to comment.