Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207237
b: refs/heads/master
c: 44ab57a
h: refs/heads/master
i:
  207235: d5e0458
v: v3
  • Loading branch information
Andrea Arcangeli authored and Linus Torvalds committed Aug 10, 2010
1 parent 0878d9a commit 924867f
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 21d0d443cdc1658a8c1484fdcece4803f0f96d0e
refs/heads/master: 44ab57a06ded284db6ccdefc6b76eddb1c34d7ed
3 changes: 3 additions & 0 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ static void __page_check_anon_rmap(struct page *page,
* are initially only visible via the pagetables, and the pte is locked
* over the call to page_add_new_anon_rmap.
*/
BUG_ON(page_anon_vma(page)->root != vma->anon_vma->root);
BUG_ON(page->index != linear_page_index(vma, address));
#endif
}
Expand Down Expand Up @@ -1408,6 +1409,7 @@ int try_to_munlock(struct page *page)
*/
void drop_anon_vma(struct anon_vma *anon_vma)
{
BUG_ON(atomic_read(&anon_vma->external_refcount) <= 0);
if (atomic_dec_and_lock(&anon_vma->external_refcount, &anon_vma->root->lock)) {
struct anon_vma *root = anon_vma->root;
int empty = list_empty(&anon_vma->head);
Expand All @@ -1419,6 +1421,7 @@ void drop_anon_vma(struct anon_vma *anon_vma)
* the refcount on the root and check if we need to free it.
*/
if (empty && anon_vma != root) {
BUG_ON(atomic_read(&root->external_refcount) <= 0);
last_root_user = atomic_dec_and_test(&root->external_refcount);
root_empty = list_empty(&root->head);
}
Expand Down

0 comments on commit 924867f

Please sign in to comment.