diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -283,7 +283,10 @@ static int page_referenced_one(struct page *page, | |||
283 | if (!pte) | 283 | if (!pte) |
284 | goto out; | 284 | goto out; |
285 | 285 | ||
286 | 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)) | ||
287 | referenced++; | 290 | referenced++; |
288 | 291 | ||
289 | /* Pretend the page is referenced if the task has the | 292 | /* Pretend the page is referenced if the task has the |