History

mm: Add folio_mapcount()

This implements the same algorithm as total_mapcount(), which is transformed into a wrapper function.

Matthew Wilcox (Oracle) committed 4 years ago

Commit 4ba11191 parent 74e8ee43 files · +40 −25Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/mm.h+7−1
@@ -825,8 +825,14 @@ static inline int page_mapcount(struct page *page) · 824 unmodified lines
825 return atomic_read(&page->_mapcount) + 1;825 return atomic_read(&page->_mapcount) + 1;
826}826}
827 827
828int folio_mapcount(struct folio *folio);
829
828#ifdef CONFIG_TRANSPARENT_HUGEPAGE830#ifdef CONFIG_TRANSPARENT_HUGEPAGE
829int total_mapcount(struct page *page);831static inline int total_mapcount(struct page *page)
832{
833 return folio_mapcount(page_folio(page));
834}
835
830int page_trans_huge_mapcount(struct page *page);836int page_trans_huge_mapcount(struct page *page);
831#else837#else
832static inline int total_mapcount(struct page *page)838static inline int total_mapcount(struct page *page)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t