[PATCH] kill missed pte warning
From: Hugh Dickins
Date: Wed Jun 02 2004 - 15:16:47 EST
I've seen no warnings, nor heard any reports of warnings, that anon_vma
ever misses ptes (nor anonmm before it). That WARN_ON (with its useless
stack dump) was okay to goad developers into making reports, but would
mainly be an irritation if it ever appears on user systems: kill it now.
Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
mm/rmap.c | 29 +++++++----------------------
1 files changed, 7 insertions(+), 22 deletions(-)
--- 2.6.7-rc2/mm/rmap.c 2004-05-30 11:36:40.000000000 +0100
+++ linux/mm/rmap.c 2004-06-02 16:32:17.644617976 +0100
@@ -193,7 +193,7 @@ vma_address(struct page *page, struct vm
* repeatedly from either page_referenced_anon or page_referenced_file.
*/
static int page_referenced_one(struct page *page,
- struct vm_area_struct *vma, unsigned int *mapcount, int *failed)
+ struct vm_area_struct *vma, unsigned int *mapcount)
{
struct mm_struct *mm = vma->vm_mm;
unsigned long address;
@@ -208,14 +208,8 @@ static int page_referenced_one(struct pa
if (address == -EFAULT)
goto out;
- if (!spin_trylock(&mm->page_table_lock)) {
- /*
- * For debug we're currently warning if not all found,
- * but in this case that's expected: suppress warning.
- */
- (*failed)++;
+ if (!spin_trylock(&mm->page_table_lock))
goto out;
- }
pgd = pgd_offset(mm, address);
if (!pgd_present(*pgd))
@@ -251,18 +245,14 @@ static inline int page_referenced_anon(s
struct anon_vma *anon_vma = (struct anon_vma *) page->mapping;
struct vm_area_struct *vma;
int referenced = 0;
- int failed = 0;
spin_lock(&anon_vma->lock);
BUG_ON(list_empty(&anon_vma->head));
list_for_each_entry(vma, &anon_vma->head, anon_vma_node) {
- referenced += page_referenced_one(page, vma,
- &mapcount, &failed);
+ referenced += page_referenced_one(page, vma, &mapcount);
if (!mapcount)
- goto out;
+ break;
}
- WARN_ON(!failed);
-out:
spin_unlock(&anon_vma->lock);
return referenced;
}
@@ -289,7 +279,6 @@ static inline int page_referenced_file(s
struct vm_area_struct *vma = NULL;
struct prio_tree_iter iter;
int referenced = 0;
- int failed = 0;
if (!spin_trylock(&mapping->i_mmap_lock))
return 0;
@@ -299,17 +288,13 @@ static inline int page_referenced_file(s
if ((vma->vm_flags & (VM_LOCKED|VM_MAYSHARE))
== (VM_LOCKED|VM_MAYSHARE)) {
referenced++;
- goto out;
+ break;
}
- referenced += page_referenced_one(page, vma,
- &mapcount, &failed);
+ referenced += page_referenced_one(page, vma, &mapcount);
if (!mapcount)
- goto out;
+ break;
}
- if (list_empty(&mapping->i_mmap_nonlinear))
- WARN_ON(!failed);
-out:
spin_unlock(&mapping->i_mmap_lock);
return referenced;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/