struct vm_area_struct *next);
 extern int vma_shrink(struct vma_iterator *vmi, struct vm_area_struct *vma,
                       unsigned long start, unsigned long end, pgoff_t pgoff);
-extern struct vm_area_struct *vma_merge(struct vma_iterator *vmi,
-       struct mm_struct *, struct vm_area_struct *prev, unsigned long addr,
-       unsigned long end, unsigned long vm_flags, struct anon_vma *,
-       struct file *, pgoff_t, struct mempolicy *, struct vm_userfaultfd_ctx,
-       struct anon_vma_name *);
 extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
-extern int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *,
-                      unsigned long addr, int new_below);
-extern int split_vma(struct vma_iterator *vmi, struct vm_area_struct *,
-                        unsigned long addr, int new_below);
 extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
 extern void unlink_file_vma(struct vm_area_struct *);
 extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
 
                                   unsigned long addr, pmd_t *pmd,
                                   unsigned int flags);
 
+/*
+ * mm/mmap.c
+ */
+struct vm_area_struct *vma_merge(struct vma_iterator *vmi,
+       struct mm_struct *, struct vm_area_struct *prev, unsigned long addr,
+       unsigned long end, unsigned long vm_flags, struct anon_vma *,
+       struct file *, pgoff_t, struct mempolicy *, struct vm_userfaultfd_ctx,
+       struct anon_vma_name *);
+
 enum {
        /* mark page accessed */
        FOLL_TOUCH = 1 << 16,
 
  * has already been checked or doesn't make sense to fail.
  * VMA Iterator will point to the end VMA.
  */
-int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
-               unsigned long addr, int new_below)
+static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
+                      unsigned long addr, int new_below)
 {
        struct vma_prepare vp;
        struct vm_area_struct *new;
  * Split a vma into two pieces at address 'addr', a new vma is allocated
  * either for the first part or the tail.
  */
-int split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
-             unsigned long addr, int new_below)
+static int split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
+                    unsigned long addr, int new_below)
 {
        if (vma->vm_mm->map_count >= sysctl_max_map_count)
                return -ENOMEM;
 
  * split a vma into two pieces at address 'addr', a new vma is allocated either
  * for the first part or the tail.
  */
-int split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
-             unsigned long addr, int new_below)
+static int split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
+                    unsigned long addr, int new_below)
 {
        struct vm_area_struct *new;
        struct vm_region *region;