Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198239
b: refs/heads/master
c: 67b9509
h: refs/heads/master
i:
  198237: 5a639ab
  198235: b85fa9c
  198231: 0b70a64
  198223: a6ae2c7
  198207: 8996e92
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed May 25, 2010
1 parent b45f90c commit d83e277
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 7f60c214fd3a360461f3286c6908084f7f8b1950
refs/heads/master: 67b9509b2c68ae38cecb83a239881cb0ddf087dc
11 changes: 11 additions & 0 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,17 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
if (PageAnon(page)) {
rcu_read_lock();
rcu_locked = 1;

/*
* If the page has no mappings any more, just bail. An
* unmapped anon page is likely to be freed soon but worse,
* it's possible its anon_vma disappeared between when
* the page was isolated and when we reached here while
* the RCU lock was not held
*/
if (!page_mapped(page))
goto rcu_unlock;

anon_vma = page_anon_vma(page);
atomic_inc(&anon_vma->external_refcount);
}
Expand Down

0 comments on commit d83e277

Please sign in to comment.