We have the pra.mapcount already, and there is no need to call the page_mapped() which may do some complicated computing for compound page. Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx> --- mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/rmap.c b/mm/rmap.c index 76c8dfd3ae1c..6c5843dddb5a 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -850,7 +850,7 @@ int page_referenced(struct page *page, }; *vm_flags = 0; - if (!page_mapped(page)) + if (!pra.mapcount) return 0; if (!page_rmapping(page)) -- 2.17.1