summaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 0334c8f..57ad276 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -283,7 +283,10 @@ static int page_referenced_one(struct page *page,
if (!pte)
goto out;
- if (ptep_clear_flush_young(vma, address, pte))
+ if (vma->vm_flags & VM_LOCKED) {
+ referenced++;
+ *mapcount = 1; /* break early from loop */
+ } else if (ptep_clear_flush_young(vma, address, pte))
referenced++;
/* Pretend the page is referenced if the task has the
OpenPOWER on IntegriCloud