diff options
author | 2022-01-14 14:06:51 -0800 | |
---|---|---|
committer | 2022-01-15 16:30:28 +0200 | |
commit | d08d2b62510e2407cf939e693aefd179dc114913 (patch) | |
tree | 7c4b1be61baf0bb47d1a547d1289342840534999 /include/linux/mm.h | |
parent | mm: remove the total_mapcount argument from page_trans_huge_map_swapcount() (diff) | |
download | linux-d08d2b62510e2407cf939e693aefd179dc114913.tar.gz linux-d08d2b62510e2407cf939e693aefd179dc114913.tar.bz2 linux-d08d2b62510e2407cf939e693aefd179dc114913.zip |
mm: remove the total_mapcount argument from page_trans_huge_mapcount()
All callers pass NULL, so we can stop calculating the value we would
store in it.
Link: https://lkml.kernel.org/r/20211220205943.456187-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4d7245e6802a..cef65f9cbdf2 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -799,19 +799,15 @@ static inline int page_mapcount(struct page *page) #ifdef CONFIG_TRANSPARENT_HUGEPAGE int total_mapcount(struct page *page); -int page_trans_huge_mapcount(struct page *page, int *total_mapcount); +int page_trans_huge_mapcount(struct page *page); #else static inline int total_mapcount(struct page *page) { return page_mapcount(page); } -static inline int page_trans_huge_mapcount(struct page *page, - int *total_mapcount) +static inline int page_trans_huge_mapcount(struct page *page) { - int mapcount = page_mapcount(page); - if (total_mapcount) - *total_mapcount = mapcount; - return mapcount; + return page_mapcount(page); } #endif |