diff options
author | Michal Hocko <mhocko@suse.com> | 2017-02-08 10:27:34 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-02-09 21:53:04 +1100 |
commit | ed5c2a7c2b5e41da54ea375b88bb1987c947cde8 (patch) | |
tree | 0c4cbe7baf5c498678a0ff3dd8b72055f3532f8d /mm | |
parent | 43fe4fa30a944c0d034851ed2ab01fd5c86e7107 (diff) |
userfaultfd-non-cooperative-add-event-for-memory-unmaps-fix
This breaks compilation on nommu configs.
mm/nommu.c:1201:15: error: conflicting types for 'do_mmap'
unsigned long do_mmap(struct file *file,
^
In file included from mm/nommu.c:19:0:
./include/linux/mm.h:2089:22: note: previous declaration of 'do_mmap' was here
extern unsigned long do_mmap(struct file *file, unsigned long addr,
^
mm/nommu.c:1580:5: error: conflicting types for 'do_munmap'
int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
^
In file included from mm/nommu.c:19:0:
./include/linux/mm.h:2093:12: note: previous declaration of 'do_munmap' was here
extern int do_munmap(struct mm_struct *, unsigned long, size_t,
^
make[1]: *** [mm/nommu.o] Error 1
CONFIG_USERFAULTFD depends on CONFIG_MMU so I guess we are OK to just ignore the
argument.
Link: http://lkml.kernel.org/r/20170202091503.GA22823@dhcp22.suse.cz
Signed-off-by: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/nommu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 215c62296028..c18dab42fc10 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1205,7 +1205,8 @@ unsigned long do_mmap(struct file *file, unsigned long flags, vm_flags_t vm_flags, unsigned long pgoff, - unsigned long *populate) + unsigned long *populate, + struct list_head *uf_unused) { struct vm_area_struct *vma; struct vm_region *region; @@ -1577,7 +1578,7 @@ static int shrink_vma(struct mm_struct *mm, * - under NOMMU conditions the chunk to be unmapped must be backed by a single * VMA, though it need not cover the whole VMA */ -int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) +int do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list_head *uf) { struct vm_area_struct *vma; unsigned long end; @@ -1643,7 +1644,7 @@ int vm_munmap(unsigned long addr, size_t len) int ret; down_write(&mm->mmap_sem); - ret = do_munmap(mm, addr, len); + ret = do_munmap(mm, addr, len, NULL); up_write(&mm->mmap_sem); return ret; } |