summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2024-01-11 18:24:28 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-02-22 03:00:03 +0300
commita23f517b0e1554467b0eb3bc1ebcb4d626217302 (patch)
tree78d7ba95469e1884b1162ec15004921ad87ec867 /include
parenteabafaaa957553142cdafc8ae804fb679e5a5f5e (diff)
downloadlinux-a23f517b0e1554467b0eb3bc1ebcb4d626217302.tar.xz
mm: convert mm_counter() to take a folio
Now all callers of mm_counter() have a folio, convert mm_counter() to take a folio. Saves a call to compound_head() hidden inside PageAnon(). Link: https://lkml.kernel.org/r/20240111152429.3374566-10-willy@infradead.org Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f5a97dec5169..22e597b36b38 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2603,11 +2603,11 @@ static inline int mm_counter_file(struct page *page)
return MM_FILEPAGES;
}
-static inline int mm_counter(struct page *page)
+static inline int mm_counter(struct folio *folio)
{
- if (PageAnon(page))
+ if (folio_test_anon(folio))
return MM_ANONPAGES;
- return mm_counter_file(page);
+ return mm_counter_file(&folio->page);
}
static inline unsigned long get_mm_rss(struct mm_struct *mm)