mm, THP: don't hold mmap_sem in khugepaged when allocating THP
[firefly-linux-kernel-4.4.55.git] / mm / rmap.c
index 3e8491c504f8bedc432293484bfe1f31fa1e6f46..bc74e0012809943930ab52fcc3857e080f152049 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1355,7 +1355,11 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,
                        continue;       /* don't unmap */
                }
 
-               if (ptep_clear_flush_young_notify(vma, address, pte))
+               /*
+                * No need for _notify because we're within an
+                * mmu_notifier_invalidate_range_ {start|end} scope.
+                */
+               if (ptep_clear_flush_young(vma, address, pte))
                        continue;
 
                /* Nuke the page table entry. */