mm: introduce vma detached flag
authorSuren Baghdasaryan <surenb@google.com>
Mon, 27 Feb 2023 17:36:21 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 6 Apr 2023 03:02:59 +0000 (20:02 -0700)
commit457f67be5910a2b5f1fda8af06bfe4d3492a0a4f
treed28c0949fd9211d20dfbe3d50a1e8ed38470e05a
parenteeff9a5d47f89bc641034fea05501c8a6de131cb
mm: introduce vma detached flag

Per-vma locking mechanism will search for VMA under RCU protection and
then after locking it, has to ensure it was not removed from the VMA tree
after we found it.  To make this check efficient, introduce a
vma->detached flag to mark VMAs which were removed from the VMA tree.

Link: https://lkml.kernel.org/r/20230227173632.3292573-23-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
include/linux/mm_types.h
mm/mmap.c