• Andrew Morton's avatar
    [PATCH] rmap 3 arches + mapping_mapped · fbf7adfa
    Andrew Morton authored
    From: Hugh Dickins <hugh@veritas.com>
    
    Some arches refer to page->mapping for their dcache flushing: use
    page_mapping(page) for safety, to avoid confusion on anon pages, which will
    store a different pointer there - though in most cases flush_dcache_page is
    being applied to pagecache pages.
    
    arm has a useful mapping_mapped macro: move that to generic, and add
    mapping_writably_mapped, to avoid explicit list_empty checks on i_mmap and
    i_mmap_shared in several places.
    
    Very tempted to add page_mapped(page) tests, perhaps along with the
    mapping_writably_mapped tests in do_generic_mapping_read and
    do_shmem_file_read, to cut down on wasted flush_dcache effort; but the
    serialization is not obvious, too unsafe to do in a hurry.
    fbf7adfa
fault-armv.c 9.09 KB