[PATCH 1/4] ipc/shm: do not check for MAP_POPULATE

From: Davidlohr Bueso
Date: Thu Feb 09 2017 - 15:53:32 EST


We do not support prefaulting functionality in sysv shm,
nor MAP_NONBLOCK for that matter. Drop the pointless check
for populate in do_shmat().

Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx>
---
ipc/shm.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/ipc/shm.c b/ipc/shm.c
index 06ea9ef7f54a..6b3769967789 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1234,8 +1234,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg,
err = (long)addr;
invalid:
up_write(&current->mm->mmap_sem);
- if (populate)
- mm_populate(addr, populate);

out_fput:
fput(file);
--
2.6.6