path: root/ipc
diff options
authorPeter Collingbourne <>2020-08-06 23:23:37 -0700
committerLinus Torvalds <>2020-08-07 11:33:27 -0700
commit45e55300f11495ed58c53427da7f0d958800a30f (patch)
treed963319949f57eedbbfa7ced3b5f3dab2db717f0 /ipc
parentd70cec8983241a6aafadf78e2d65bbafac87ab6a (diff)
mm: remove unnecessary wrapper function do_mmap_pgoff()
The current split between do_mmap() and do_mmap_pgoff() was introduced in commit 1fcfd8db7f82 ("mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()") to support MPX. The wrapper function do_mmap_pgoff() always passed 0 as the value of the vm_flags argument to do_mmap(). However, MPX support has subsequently been removed from the kernel and there were no more direct callers of do_mmap(); all calls were going via do_mmap_pgoff(). Simplify the code by removing do_mmap_pgoff() and changing all callers to directly call do_mmap(), which now no longer takes a vm_flags argument. Signed-off-by: Peter Collingbourne <> Signed-off-by: Andrew Morton <> Reviewed-by: Andrew Morton <> Reviewed-by: David Hildenbrand <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'ipc')
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 0a6dd94afa21..bf38d7e2fbe9 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1558,7 +1558,7 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg,
goto invalid;
- addr = do_mmap_pgoff(file, addr, size, prot, flags, 0, &populate, NULL);
+ addr = do_mmap(file, addr, size, prot, flags, 0, &populate, NULL);
*raddr = addr;
err = 0;
if (IS_ERR_VALUE(addr))