summaryrefslogtreecommitdiff
path: root/mm/internal.h
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@Oracle.com>2023-01-20 19:26:41 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-02-10 03:51:37 +0300
commit440703e082b9c79c3d4fffcca8c2dffd621e6dc5 (patch)
tree308262bca0180b0abbcdd6ffb1b7c2dfb9d8a294 /mm/internal.h
parente3d73f848e5f2e9da46646c97fb127dfc6868767 (diff)
downloadlinux-440703e082b9c79c3d4fffcca8c2dffd621e6dc5.tar.xz
mm/mmap: refactor locking out of __vma_adjust()
Move the locking into vma_prepare() and vma_complete() for use elsewhere Link: https://lkml.kernel.org/r/20230120162650.984577-41-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index ffd65248f266..90bb2078444c 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -941,4 +941,18 @@ static inline int vma_iter_store_gfp(struct vma_iterator *vmi,
return 0;
}
+
+/*
+ * VMA lock generalization
+ */
+struct vma_prepare {
+ struct vm_area_struct *vma;
+ struct vm_area_struct *adj_next;
+ struct file *file;
+ struct address_space *mapping;
+ struct anon_vma *anon_vma;
+ struct vm_area_struct *insert;
+ struct vm_area_struct *remove;
+ struct vm_area_struct *remove2;
+};
#endif /* __MM_INTERNAL_H */