]> Git Repo - linux.git/commit - mm/mremap.c
mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success
authorLi Xinhai <[email protected]>
Wed, 24 Feb 2021 20:04:53 +0000 (12:04 -0800)
committerLinus Torvalds <[email protected]>
Wed, 24 Feb 2021 21:38:30 +0000 (13:38 -0800)
commit1583aa278f5f6a58b6ff8e9e703d0cca2b953d97
treef761487c4eb067ea5aef4c5f12d860a780073a9d
parentee8ab1903e3d912d8f10bedbf96c3b6a1c8cbede
mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success

mremap with MREMAP_DONTUNMAP can move all page table entries to new vma,
which means all pages allocated for the old vma are not relevant to it
anymore, and the relevant anon_vma links needs to be unlinked, in nature
the old vma is much like been freshly created and have no pages been fault
in.

But we should not do unlink, if the new vma has effectively merged with
the old one.

[[email protected]: v2]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Li Xinhai <[email protected]>
Cc: Brian Geffon <[email protected]>
Cc: Lokesh Gidra <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/mremap.c
This page took 0.051603 seconds and 4 git commands to generate.