diff options
| author | Alex Shi <alexs@kernel.org> | 2024-12-17 00:04:37 +0900 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-25 20:22:33 -0800 |
| commit | 7d2e1a695023bbcd76d9ca312ab8b369eee98685 (patch) | |
| tree | b55d93abc4ba670b67fa5c7c10566e2a7c9501e8 /mm/zpdesc.h | |
| parent | 8f1868ad0c88ed0c8a56bc02da6831f843e6507b (diff) | |
mm/zsmalloc: convert create_page_chain() and its users to use zpdesc
Introduce a few helper functions for conversion to convert
create_page_chain() to use zpdesc, then use zpdesc in replace_sub_page().
Link: https://lkml.kernel.org/r/20241216150450.1228021-7-42.hyeyoo@gmail.com
Originally-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Acked-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/zpdesc.h')
| -rw-r--r-- | mm/zpdesc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/zpdesc.h b/mm/zpdesc.h index d539ec100a3b..cbd37d9725c7 100644 --- a/mm/zpdesc.h +++ b/mm/zpdesc.h @@ -148,4 +148,10 @@ static inline struct zpdesc *pfn_zpdesc(unsigned long pfn) { return page_zpdesc(pfn_to_page(pfn)); } + +static inline void __zpdesc_set_movable(struct zpdesc *zpdesc, + const struct movable_operations *mops) +{ + __SetPageMovable(zpdesc_page(zpdesc), mops); +} #endif |
