]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mapletree: build fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 11 May 2022 00:47:10 +0000 (17:47 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 11 May 2022 13:09:53 +0000 (09:09 -0400)
Fix the vma_mas_store/vma_mas_remove issues.  Missing prototypes, missing
implementation on nommu.

Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/mmap.c
mm/nommu.c

index d42dc897a913b48cde9ac687f25e3ce4153911cb..ad9f7157975693eb0f78bcc175620f28b6f7efc3 100644 (file)
@@ -2639,6 +2639,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
        bool *need_rmap_locks);
 extern void exit_mmap(struct mm_struct *);
 
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas);
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas);
+
 static inline int check_data_rlimit(unsigned long rlim,
                                    unsigned long new,
                                    unsigned long start,
index e777da0132f6e4c9c5dbd738350136d218138ed3..9d97688e21bedb40e4aab3e5f9e5339848510463 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -754,7 +754,7 @@ static void __vma_link_file(struct vm_area_struct *vma)
  *
  * Note: the end address is inclusive in the maple tree.
  */
-inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
 {
        trace_vma_store(mas->tree, vma);
        mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
@@ -770,7 +770,7 @@ inline void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
  * been established and points to the correct location.
  * Note: the end address is inclusive in the maple tree.
  */
-static inline void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
 {
        trace_vma_mas_szero(mas->tree, vma->vm_start, vma->vm_end - 1);
        mas->index = vma->vm_start;
index 9d7afc2d959e4ca99e305c0439991cccdf5ba194..5af0b050eba8d83b6a3237dc4e7ed4bc2f69ebda 100644 (file)
@@ -545,6 +545,19 @@ static void put_nommu_region(struct vm_region *region)
        __put_nommu_region(region);
 }
 
+void vma_mas_store(struct vm_area_struct *vma, struct ma_state *mas)
+{
+       mas_set_range(mas, vma->vm_start, vma->vm_end - 1);
+       mas_store_prealloc(mas, vma);
+}
+
+void vma_mas_remove(struct vm_area_struct *vma, struct ma_state *mas)
+{
+       mas->index = vma->vm_start;
+       mas->last = vma->vm_end - 1;
+       mas_store_prealloc(mas, NULL);
+}
+
 /*
  * add a VMA into a process's mm_struct in the appropriate place in the list
  * and tree and add to the address space's page tree also if not an anonymous