• Hugh Dickins's avatar
    [PATCH] mm: vma_adjust insert file earlier · a888f1f5
    Hugh Dickins authored
    For those arches (arm and parisc) which use the i_mmap tree to implement
    flush_dcache_page, during split_vma there's a small window in vma_adjust when
    flush_dcache_mmap_lock is dropped, and pages in the split-off part of the vma
    might for an instant be invisible to __flush_dcache_page.
    
    Though we're more solid there than ever before, I guess it's a bad idea to
    leave that window: so (with regret, it was structurally nicer before) take
    __vma_link_file (and vma_prio_tree_init) out of __vma_link.
    
    vma_prio_tree_init (which NULLs a few fields) is actually only needed when
    copying a vma, not when a new one has just been memset to 0.
    
    __insert_vm_struct is used by nothing but vma_adjust's split_vma case:
    comment it accordingly, remove its mark_mm_hugetlb (it can never create
    a new kind of vma) and its validate_mm (another follows immediately).
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    a888f1f5
mmap.c 46.8 KB