aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Shijie <[email protected]>2019-05-13 17:21:07 -0700
committerLinus Torvalds <[email protected]>2019-05-14 09:47:49 -0700
commit059d8442ea77dd995c7ec075c6a6cca527b1c244 (patch)
tree8299026f710428aca2cbe8ffecec2aa4bd71ef9a
parentcfcbfb1382dbac331d8aa92d3a218a16b803b2a9 (diff)
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]>
-rw-r--r--mm/rmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 0cbed70700ed..e5dfe2ae6b0d 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))