lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 5/6] mmu_notifier: Callbacks for xip_filemap.c
    Problem for external rmaps: There is no pagelock held on the page.

    Signed-off-by: Robin Holt <holt@sgi.com>

    ---
    mm/filemap_xip.c | 5 +++++
    1 file changed, 5 insertions(+)

    Index: linux-2.6/mm/filemap_xip.c
    ===================================================================
    --- linux-2.6.orig/mm/filemap_xip.c 2008-01-25 19:39:04.000000000 -0800
    +++ linux-2.6/mm/filemap_xip.c 2008-01-25 19:39:06.000000000 -0800
    @@ -13,6 +13,7 @@
    #include <linux/module.h>
    #include <linux/uio.h>
    #include <linux/rmap.h>
    +#include <linux/mmu_notifier.h>
    #include <linux/sched.h>
    #include <asm/tlbflush.h>

    @@ -183,6 +184,9 @@ __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;
    @@ -194,6 +198,7 @@ __xip_unmap (struct address_space * mapp
    /* Nuke the page table entry. */
    flush_cache_page(vma, address, pte_pfn(*pte));
    pteval = ptep_clear_flush(vma, address, pte);
    + mmu_notifier(invalidate_page, mm, address);
    page_remove_rmap(page, vma);
    dec_mm_counter(mm, file_rss);
    BUG_ON(pte_dirty(pteval));
    --


    \
     
     \ /
      Last update: 2008-01-28 21:33    [W:0.021 / U:1.196 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site