aboutsummaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index dbc2ca2057a5..57ad276900c9 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -36,7 +36,6 @@
36 * mapping->tree_lock (widely used, in set_page_dirty, 36 * mapping->tree_lock (widely used, in set_page_dirty,
37 * in arch-dependent flush_dcache_mmap_lock, 37 * in arch-dependent flush_dcache_mmap_lock,
38 * within inode_lock in __sync_single_inode) 38 * within inode_lock in __sync_single_inode)
39 * zone->lock (within radix tree node alloc)
40 */ 39 */
41 40
42#include <linux/mm.h> 41#include <linux/mm.h>
@@ -284,7 +283,10 @@ static int page_referenced_one(struct page *page,
284 if (!pte) 283 if (!pte)
285 goto out; 284 goto out;
286 285
287 if (ptep_clear_flush_young(vma, address, pte)) 286 if (vma->vm_flags & VM_LOCKED) {
287 referenced++;
288 *mapcount = 1; /* break early from loop */
289 } else if (ptep_clear_flush_young(vma, address, pte))
288 referenced++; 290 referenced++;
289 291
290 /* Pretend the page is referenced if the task has the 292 /* Pretend the page is referenced if the task has the