]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: conditionally write-lock VMA in free_pgtables
authorSuren Baghdasaryan <surenb@google.com>
Sat, 11 Jun 2022 05:09:08 +0000 (22:09 -0700)
committerSuren Baghdasaryan <surenb@google.com>
Wed, 23 Nov 2022 02:09:45 +0000 (02:09 +0000)
commitb5d2d49828423b4c98ebd01a3610437e174f8607
tree28084773d2eeda82f2a0363e5497672ee9cf897a
parenteba1746e75fe853db744bbf1be9c11707c6bc08d
mm: conditionally write-lock VMA in free_pgtables

Normally free_pgtables needs to lock affected VMAs except for the case
when VMAs were isolated under VMA write-lock. munmap() does just that,
isolating while holding appropriate locks and then downgrading mmap_lock
and dropping per-VMA locks before freeing page tables.
Add a parameter to free_pgtables and unmap_region for such scenario.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
mm/internal.h
mm/memory.c
mm/mmap.c