2.  filemap_populate and shmem_populate expect an absolute pgoff, but
try_to_unmap_one is forgetting to add in vm_pgoff when doing set_pte.
Could be done the other way round, with relative pgoff in the pte?
No, that would make splitting a vma tedious.




 25-akpm/mm/rmap.c |    2 ++
 mm/fremap.c       |    0 
 2 files changed, 2 insertions(+)

diff -puN mm/rmap.c~hugh-remap-fix mm/rmap.c
--- 25/mm/rmap.c~hugh-remap-fix	Wed Mar 12 14:35:12 2003
+++ 25-akpm/mm/rmap.c	Wed Mar 12 14:36:19 2003
@@ -381,6 +381,8 @@ static int try_to_unmap_one(struct page 
 		 * in the pte.
 		 */
 		pgidx = (address - vma->vm_start) >> PAGE_SHIFT;
+		pgidx += vma->vm_pgoff;
+		pgidx >>= PAGE_CACHE_SHIFT - PAGE_SHIFT;
 		if (page->index != pgidx) {
 			set_pte(ptep, pgoff_to_pte(page->index));
 			BUG_ON(!pte_file(*ptep));
diff -puN mm/fremap.c~hugh-remap-fix mm/fremap.c

_