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, 5 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 450f5241b5a5..1fc559e09ca8 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -298,7 +298,11 @@ static int page_referenced_one(struct page *page,
298 if (ptep_clear_flush_young(vma, address, pte)) 298 if (ptep_clear_flush_young(vma, address, pte))
299 referenced++; 299 referenced++;
300 300
301 if (mm != current->mm && !ignore_token && has_swap_token(mm)) 301 /* Pretend the page is referenced if the task has the
302 swap token and is in the middle of a page fault. */
303 if (mm != current->mm && !ignore_token &&
304 has_swap_token(mm) &&
305 rwsem_is_locked(&mm->mmap_sem))
302 referenced++; 306 referenced++;
303 307
304 (*mapcount)--; 308 (*mapcount)--;