summaryrefslogtreecommitdiffstats
path: root/mm/mlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mlock.c')
-rw-r--r--mm/mlock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index 048260c..7debb4f 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -549,7 +549,8 @@ SYSCALL_DEFINE1(mlockall, int, flags)
if (!can_do_mlock())
goto out;
- lru_add_drain_all(); /* flush pagevec */
+ if (flags & MCL_CURRENT)
+ lru_add_drain_all(); /* flush pagevec */
down_write(&current->mm->mmap_sem);
OpenPOWER on IntegriCloud