• Andrew Morton's avatar
    [PATCH] rmap 15: vma_adjust · fb41b417
    Andrew Morton authored
    From: Hugh Dickins <hugh@veritas.com>
    
    If file-based vmas are to be kept in a tree, according to the file offsets
    they map, then adjusting the vma's start pgoff or its end involves
    repositioning in the tree, while holding i_shared_lock (and page_table_lock). 
    We used to avoid that if possible, e.g.  when just moving end; but if we're
    heading that way, let's now tidy up vma_merge and split_vma, and do all the
    locking and adjustment in a new helper vma_adjust.  And please, let's call the
    next vma in vma_merge "next" rather than "prev".
    
    Since these patches are diffed over 2.6.6-rc2-mm2, they include the NUMA
    mpolicy mods which you'll have to remove to go earlier in the series, sorry
    for that nuisance.  I have intentionally changed the one vma_mpol_equal to
    mpol_equal, to make the merge cases more alike.
    fb41b417
mremap.c 10.9 KB