mm: more likely reclaim MADV_SEQUENTIAL mappings
[sfrench/cifs-2.6.git] / mm / memory.c
index 5e0e91cc6b67a895a2ca2c9101113f2a89877cc2..99e8d5c7b3126a455d664942d0f90621ce6c8825 100644 (file)
@@ -767,7 +767,8 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
                        else {
                                if (pte_dirty(ptent))
                                        set_page_dirty(page);
-                               if (pte_young(ptent))
+                               if (pte_young(ptent) &&
+                                   likely(!VM_SequentialReadHint(vma)))
                                        mark_page_accessed(page);
                                file_rss--;
                        }