diff options
Diffstat (limited to 'mm/rmap.c')
-rw-r--r-- | mm/rmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -413,9 +413,6 @@ int page_referenced(struct page *page, int is_locked, { int referenced = 0; - if (page_test_and_clear_young(page)) - referenced++; - if (TestClearPageReferenced(page)) referenced++; @@ -433,6 +430,10 @@ int page_referenced(struct page *page, int is_locked, unlock_page(page); } } + + if (page_test_and_clear_young(page)) + referenced++; + return referenced; } |