The patch titled Subject: mm/zsmalloc: reset zpdesc fields in reset_zpdesc() has been added to the -mm mm-unstable branch. Its filename is mm-zsmalloc-convert-reset_page-to-reset_zpdesc-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-zsmalloc-convert-reset_page-to-reset_zpdesc-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx> Subject: mm/zsmalloc: reset zpdesc fields in reset_zpdesc() Date: Tue, 14 Jan 2025 00:29:52 +0900 To prepare for the future removal of struct page fields (e.g. the removal of page->index [1]), update reset_zpdesc() to reset the descriptor via struct zpdesc instead of struct page. As struct zpdesc overlays struct page for now, no functional change is intended. [1] https://lore.kernel.org/linux-mm/Z09hOy-UY9KC8WMb@xxxxxxxxxxxxxxxxxxxx Link: https://lkml.kernel.org/r/Z4Uw136VdG7vlKCL@localhost.localdomain Signed-off-by: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx> Cc: Alex Shi <alexs@xxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Cc: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/zsmalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/zsmalloc.c~mm-zsmalloc-convert-reset_page-to-reset_zpdesc-fix +++ a/mm/zsmalloc.c @@ -849,8 +849,8 @@ static void reset_zpdesc(struct zpdesc * __ClearPageMovable(page); ClearPagePrivate(page); - set_page_private(page, 0); - page->index = 0; + zpdesc->zspage = NULL; + zpdesc->next = NULL; __ClearPageZsmalloc(page); } _ Patches currently in -mm which might be from 42.hyeyoo@xxxxxxxxx are mm-zsmalloc-convert-__zs_map_object-__zs_unmap_object-to-use-zpdesc.patch mm-zsmalloc-add-and-use-pfn-zpdesc-seeking-funcs.patch mm-zsmalloc-convert-obj_malloc-to-use-zpdesc.patch mm-zsmalloc-convert-obj_allocated-and-related-helpers-to-use-zpdesc.patch mm-zsmalloc-convert-init_zspage-to-use-zpdesc.patch mm-zsmalloc-convert-obj_to_page-and-zs_free-to-use-zpdesc.patch mm-zsmalloc-add-two-helpers-for-zs_page_migrate-and-make-it-use-zpdesc.patch mm-zsmalloc-convert-reset_page-to-reset_zpdesc-fix.patch mm-zsmalloc-convert-__free_zspage-to-use-zpdesc.patch mm-zsmalloc-convert-location_to_obj-to-take-zpdesc.patch mm-zsmalloc-convert-migrate_zspage-to-use-zpdesc.patch mm-zsmalloc-convert-get_zspage-to-take-zpdesc.patch