mmu_notifier: Callbacks for xip_filemap.c Do the same trick that we use for do_wp_page(): Call invalidate_range_start/end on a single page. Signed-off-by: Robin Holt Signed-off-by: Christoph Lameter --- mm/filemap_xip.c | 7 +++++++ 1 file changed, 7 insertions(+) Index: linux-2.6/mm/filemap_xip.c =================================================================== --- linux-2.6.orig/mm/filemap_xip.c 2008-01-30 19:35:52.000000000 -0800 +++ linux-2.6/mm/filemap_xip.c 2008-01-30 19:36:17.000000000 -0800 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -183,12 +184,17 @@ __xip_unmap (struct address_space * mapp if (!page) return; + if (PageExternalRmap(page)) + mmu_rmap_notifier(invalidate_page, page); + spin_lock(&mapping->i_mmap_lock); vma_prio_tree_foreach(vma, &iter, &mapping->i_mmap, pgoff, pgoff) { mm = vma->vm_mm; address = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); BUG_ON(address < vma->vm_start || address >= vma->vm_end); + mmu_notifier(invalidate_range_start, mm, address, + address + PAGE_SIZE - 1, 1); pte = page_check_address(page, mm, address, &ptl); if (pte) { /* Nuke the page table entry. */ @@ -200,6 +206,7 @@ __xip_unmap (struct address_space * mapp pte_unmap_unlock(pte, ptl); page_cache_release(page); } + mmu_notifier(invalidate_range_end, mm); } spin_unlock(&mapping->i_mmap_lock); }