• Lorenzo Stoakes's avatar
    mm: introduce commit_merge(), abstracting final commit of merge · 65e0aa64
    Lorenzo Stoakes authored
    Pull the part of vma_expand() which actually commits the merge operation,
    that is inserts it into the maple tree and sets the VMA's vma->vm_start
    and vma->vm_end parameters, into its own function.
    
    We implement only the parts needed for vma_expand() which now as a result
    of previous work is also the means by which new VMA ranges are merged.
    
    The next commit in the series will implement merging of existing ranges
    which will extend commit_merge() to accommodate this case and result in
    all merges using this common code.
    
    Link: https://lkml.kernel.org/r/7b985a20dfa549e3c370cd274d732b64c44f6dbd.1725040657.git.lorenzo.stoakes@oracle.comSigned-off-by: default avatarLorenzo Stoakes <lorenzo.stoakes@oracle.com>
    Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Bert Karwatzki <spasswolf@web.de>
    Cc: Jeff Xu <jeffxu@chromium.org>
    Cc: Jiri Olsa <olsajiri@gmail.com>
    Cc: Kees Cook <kees@kernel.org>
    Cc: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    65e0aa64
vma.c 56.6 KB