summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-11-16 21:17:14 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-11-17 10:36:35 -0500
commit9c3252152e8a6401c2b9e32490a5a16ec4472778 (patch)
tree3310b7b6b0a7baabdcbd155bf3543648e0130b8a
parent522a0032af005502507f5f81ae64fdcc82b5d068 (diff)
downloadlwn-9c3252152e8a6401c2b9e32490a5a16ec4472778.tar.gz
lwn-9c3252152e8a6401c2b9e32490a5a16ec4472778.zip
mm: Rename folio_test_multi to folio_test_large
This is a better name. Also add kernel-doc. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
-rw-r--r--include/linux/page-flags.h8
-rw-r--r--mm/memcontrol.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 52ec4b5e5615..05510118fbb8 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -692,7 +692,13 @@ static inline bool folio_test_single(struct folio *folio)
return !folio_test_head(folio);
}
-static inline bool folio_test_multi(struct folio *folio)
+/**
+ * folio_test_large() - Does this folio contain more than one page?
+ * @folio: The folio to test.
+ *
+ * Return: True if the folio is larger than one page.
+ */
+static inline bool folio_test_large(struct folio *folio)
{
return folio_test_head(folio);
}
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 781605e92015..6863a834ed42 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5558,7 +5558,7 @@ static int mem_cgroup_move_account(struct page *page,
VM_BUG_ON(from == to);
VM_BUG_ON_FOLIO(folio_test_lru(folio), folio);
- VM_BUG_ON(compound && !folio_test_multi(folio));
+ VM_BUG_ON(compound && !folio_test_large(folio));
/*
* Prevent mem_cgroup_migrate() from looking at