aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rmap.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-01-21 11:27:31 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:03 -0400
commitb3ac04132c4b9bc5c9c14608424d410e7ca3b400 (patch)
tree8cb5d7604e0a6c332fa49291a9fcbc04823b4564 /include/linux/rmap.h
parentdcc5d337c5e62761ee71f2e25c7aa890b1aa41a2 (diff)
downloadlinux-b3ac04132c4b9bc5c9c14608424d410e7ca3b400.tar.gz
mm/rmap: Turn page_referenced() into folio_referenced()
Both its callers pass a page which was previously on an LRU list, so were passing a folio by definition. Use the type system to enforce that and remove a few calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r--include/linux/rmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 0c838ba1a8eebf..69a1664216deb7 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -190,7 +190,7 @@ static inline void page_dup_rmap(struct page *page, bool compound)
/*
* Called from mm/vmscan.c to handle paging out
*/
-int page_referenced(struct page *, int is_locked,
+int folio_referenced(struct folio *, int is_locked,
struct mem_cgroup *memcg, unsigned long *vm_flags);
void try_to_migrate(struct page *page, enum ttu_flags flags);
@@ -301,7 +301,7 @@ void rmap_walk_locked(struct page *page, struct rmap_walk_control *rwc);
#define anon_vma_prepare(vma) (0)
#define anon_vma_link(vma) do {} while (0)
-static inline int page_referenced(struct page *page, int is_locked,
+static inline int folio_referenced(struct folio *folio, int is_locked,
struct mem_cgroup *memcg,
unsigned long *vm_flags)
{