From: Hugh Dickins <hugh@veritas.com>

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@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/mm/rmap.c |   29 +++++++----------------------
 1 files changed, 7 insertions(+), 22 deletions(-)

diff -puN mm/rmap.c~mm-kill-missed-pte-warning mm/rmap.c
--- 25/mm/rmap.c~mm-kill-missed-pte-warning	Wed Jun  2 15:12:28 2004
+++ 25-akpm/mm/rmap.c	Wed Jun  2 15:12:28 2004
@@ -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;
 }
_