Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: remove page_has_private()

This function has no more callers, except folio_has_private(). Combine
the two functions.

Link: https://lkml.kernel.org/r/20240821193445.2294269-9-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
6dc15138 3026bc1e

+5 -10
+5 -10
include/linux/page-flags.h
··· 1175 1175 #define PAGE_FLAGS_PRIVATE \ 1176 1176 (1UL << PG_private | 1UL << PG_private_2) 1177 1177 /** 1178 - * page_has_private - Determine if page has private stuff 1179 - * @page: The page to be checked 1178 + * folio_has_private - Determine if folio has private stuff 1179 + * @folio: The folio to be checked 1180 1180 * 1181 - * Determine if a page has private stuff, indicating that release routines 1181 + * Determine if a folio has private stuff, indicating that release routines 1182 1182 * should be invoked upon it. 1183 1183 */ 1184 - static inline int page_has_private(const struct page *page) 1184 + static inline int folio_has_private(const struct folio *folio) 1185 1185 { 1186 - return !!(page->flags & PAGE_FLAGS_PRIVATE); 1187 - } 1188 - 1189 - static inline bool folio_has_private(const struct folio *folio) 1190 - { 1191 - return page_has_private(&folio->page); 1186 + return !!(folio->flags & PAGE_FLAGS_PRIVATE); 1192 1187 } 1193 1188 1194 1189 #undef PF_ANY