Skip to content

Commit

Permalink
mm/rmap.c: use the pra.mapcount to do the check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Huang Shijie authored and torvalds committed May 14, 2019
1 parent cfcbfb1 commit 059d844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 059d844

Please sign in to comment.