Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58084
b: refs/heads/master
c: 30acbab
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Jun 28, 2007
1 parent f7a868d commit abe0214
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 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: 172d0496cd22c98ee2e4238821fa309c01685f3a
refs/heads/master: 30acbabae38793c9c9acace4de5b1c1889570768
24 changes: 1 addition & 23 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@

struct kmem_cache *anon_vma_cachep;

static inline void validate_anon_vma(struct vm_area_struct *find_vma)
{
#ifdef CONFIG_DEBUG_VM
struct anon_vma *anon_vma = find_vma->anon_vma;
struct vm_area_struct *vma;
unsigned int mapcount = 0;
int found = 0;

list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
mapcount++;
BUG_ON(mapcount > 100000);
if (vma == find_vma)
found = 1;
}
BUG_ON(!found);
#endif
}

/* This must be called under the mmap_sem. */
int anon_vma_prepare(struct vm_area_struct *vma)
{
Expand Down Expand Up @@ -121,10 +103,8 @@ void __anon_vma_link(struct vm_area_struct *vma)
{
struct anon_vma *anon_vma = vma->anon_vma;

if (anon_vma) {
if (anon_vma)
list_add_tail(&vma->anon_vma_node, &anon_vma->head);
validate_anon_vma(vma);
}
}

void anon_vma_link(struct vm_area_struct *vma)
Expand All @@ -134,7 +114,6 @@ void anon_vma_link(struct vm_area_struct *vma)
if (anon_vma) {
spin_lock(&anon_vma->lock);
list_add_tail(&vma->anon_vma_node, &anon_vma->head);
validate_anon_vma(vma);
spin_unlock(&anon_vma->lock);
}
}
Expand All @@ -148,7 +127,6 @@ void anon_vma_unlink(struct vm_area_struct *vma)
return;

spin_lock(&anon_vma->lock);
validate_anon_vma(vma);
list_del(&vma->anon_vma_node);

/* We must garbage collect the anon_vma if it's empty */
Expand Down

0 comments on commit abe0214

Please sign in to comment.