[PATCH] mm: fixup vma.h for nommu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some series of includes result in vma.h being imported by nommu under
certain circumstances, which references FIRST_USER_ADDRESS and
USER_PGTABLES_CEILING, neither of which are necessarily defined in a nommu
scenario.

Work around this by wrapping the inline function which references these
(init_vma_munmap()) in an #ifdef CONFIG_MMU.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
---
 mm/vma.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/vma.h b/mm/vma.h
index edc9034d675c..9d4f44a9942b 100644
--- a/mm/vma.h
+++ b/mm/vma.h
@@ -152,6 +152,7 @@ static inline int vma_iter_store_gfp(struct vma_iterator *vmi,
 	return 0;
 }

+#ifdef CONFIG_MMU
 /*
  * init_vma_munmap() - Initializer wrapper for vma_munmap_struct
  * @vms: The vma munmap struct
@@ -185,6 +186,7 @@ static inline void init_vma_munmap(struct vma_munmap_struct *vms,
 	vms->clear_ptes = false;
 	vms->closed_vm_ops = false;
 }
+#endif

 int vms_gather_munmap_vmas(struct vma_munmap_struct *vms,
 		struct ma_state *mas_detach);
--
2.46.0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux