diff --git a/mm/mlock.c b/mm/mlock.c index 048260c4e02ea7ced2692cc05fba67c9798c9145..7debb4fdf79b4ff4b536bfe5375acb1e7d56718a 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(¤t->mm->mmap_sem);