Skip to content

Commit 5ce1f48

Browse files
davidhildenbrandakpm00
authored andcommitted
mm: remove total_mapcount()
All users of total_mapcount() are gone, let's remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: David Hildenbrand <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent b4d02ba commit 5ce1f48

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

include/linux/mm.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ static inline int is_vmalloc_or_module_addr(const void *x)
11831183
* How many times the entire folio is mapped as a single unit (eg by a
11841184
* PMD or PUD entry). This is probably not what you want, except for
11851185
* debugging purposes - it does not include PTE-mapped sub-pages; look
1186-
* at folio_mapcount() or page_mapcount() or total_mapcount() instead.
1186+
* at folio_mapcount() or page_mapcount() instead.
11871187
*/
11881188
static inline int folio_entire_mapcount(struct folio *folio)
11891189
{
@@ -1243,13 +1243,6 @@ static inline int folio_mapcount(struct folio *folio)
12431243
return folio_total_mapcount(folio);
12441244
}
12451245

1246-
static inline int total_mapcount(struct page *page)
1247-
{
1248-
if (likely(!PageCompound(page)))
1249-
return atomic_read(&page->_mapcount) + 1;
1250-
return folio_total_mapcount(page_folio(page));
1251-
}
1252-
12531246
static inline bool folio_large_is_mapped(struct folio *folio)
12541247
{
12551248
/*

0 commit comments

Comments
 (0)