Skip to content

Commit 28fb54f

Browse files
VMoolaakpm00
authored andcommitted
mmzone: introduce folio_migratetype()
Introduce folio_migratetype() as a folio equivalent for get_pageblock_migratetype(). This function intends to return the migratetype the folio is located in, hence the name choice. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Vishal Moola (Oracle) <[email protected]> Reviewed-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 708ff49 commit 28fb54f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/linux/mmzone.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ extern int page_group_by_mobility_disabled;
105105
#define get_pageblock_migratetype(page) \
106106
get_pfnblock_flags_mask(page, page_to_pfn(page), MIGRATETYPE_MASK)
107107

108+
#define folio_migratetype(folio) \
109+
get_pfnblock_flags_mask(&folio->page, folio_pfn(folio), \
110+
MIGRATETYPE_MASK)
108111
struct free_area {
109112
struct list_head free_list[MIGRATE_TYPES];
110113
unsigned long nr_free;

0 commit comments

Comments
 (0)