mm: introduce VM_LOCKONFAULT
[firefly-linux-kernel-4.4.55.git] / mm / huge_memory.c
index 3fd0311c3ba70fa2e6238237c1afe58f0c47e75d..f5c08b46fef85dd5c6d4247299660a0e1acb0838 100644 (file)
@@ -1307,7 +1307,7 @@ struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
                                          pmd, _pmd,  1))
                        update_mmu_cache_pmd(vma, addr, pmd);
        }
-       if ((flags & FOLL_POPULATE) && (vma->vm_flags & VM_LOCKED)) {
+       if ((flags & FOLL_MLOCK) && (vma->vm_flags & VM_LOCKED)) {
                if (page->mapping && trylock_page(page)) {
                        lru_add_drain();
                        if (page->mapping)