Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190199
b: refs/heads/master
c: 31f2b0e
h: refs/heads/master
i:
  190197: ddf7e58
  190195: ce66d2d
  190191: a18ae87
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Apr 24, 2010
1 parent 4a30e50 commit 0b26d09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 93b4a44f3ad69520d605aace3f3486b8eb754b96
refs/heads/master: 31f2b0ebc01fd332cb0997f7ce9f9cde29af9e20
9 changes: 5 additions & 4 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ int anon_vma_prepare(struct vm_area_struct *vma)
goto out_enomem_free_avc;
allocated = anon_vma;
}
spin_lock(&anon_vma->lock);

spin_lock(&anon_vma->lock);
/* page_table_lock to protect against threads */
spin_lock(&mm->page_table_lock);
if (likely(!vma->anon_vma)) {
Expand All @@ -144,14 +144,15 @@ int anon_vma_prepare(struct vm_area_struct *vma)
list_add(&avc->same_vma, &vma->anon_vma_chain);
list_add(&avc->same_anon_vma, &anon_vma->head);
allocated = NULL;
avc = NULL;
}
spin_unlock(&mm->page_table_lock);

spin_unlock(&anon_vma->lock);
if (unlikely(allocated)) {

if (unlikely(allocated))
anon_vma_free(allocated);
if (unlikely(avc))
anon_vma_chain_free(avc);
}
}
return 0;

Expand Down

0 comments on commit 0b26d09

Please sign in to comment.