mtd: docg3: off by one in doc_register_sysfs()
[firefly-linux-kernel-4.4.55.git] / mm / swap.c
index a3a0a2f1f7c3dc48c43494b949af6aee66adcf8f..983f692a47fdfbb80505fa77f673b9af37d08739 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -32,6 +32,7 @@
 #include <linux/gfp.h>
 #include <linux/uio.h>
 #include <linux/hugetlb.h>
+#include <linux/page_idle.h>
 
 #include "internal.h"
 
@@ -622,6 +623,8 @@ void mark_page_accessed(struct page *page)
        } else if (!PageReferenced(page)) {
                SetPageReferenced(page);
        }
+       if (page_is_idle(page))
+               clear_page_idle(page);
 }
 EXPORT_SYMBOL(mark_page_accessed);