OSDN Git Service

rmap: add folio parameter to __page_set_anon_rmap()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 16 Jan 2023 19:29:59 +0000 (19:29 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:21 +0000 (22:33 -0800)
commit5b4bd90f9ac76136c7148684b12276d4ae2d64a2
treedba20cc221190f830ba7e5bb8c5a74126cdb9a34
parente0650a41f7d024b72669a2a2db846ef70281abd8
rmap: add folio parameter to __page_set_anon_rmap()

Avoid the compound_head() call in PageAnon() by passing in the folio that
all callers have.  Also save me from wondering whether page->mapping can
ever be overwritten on a tail page (I don't think it can, but I'm not 100%
sure).

Link: https://lkml.kernel.org/r/20230116192959.2147032-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/rmap.c