mm/rmap.c: use the pra.mapcount to do the check

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.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Huang Shijie <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Huang Shijie 2019-05-13 17:21:07 -07:00 • committed by Linus Torvalds
commit 059d8442ea

View file

@ -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))