From b01af5c0b0414f96e6c3891e704d1c40faa18813 Mon Sep 17 00:00:00 2001 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> Date: Sun, 12 Dec 2021 06:52:41 +0000 Subject: mm/slob: Remove unnecessary page_mapcount_reset() function call After commit 401fb12c68c2 ("mm/sl*b: Differentiate struct slab fields by sl*b implementations"), we can reorder fields of struct slab depending on slab allocator. For now, page_mapcount_reset() is called because page->_mapcount and slab->units have same offset. But this is not necessary for struct slab. Use unused field for units instead. Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka Link: https://lore.kernel.org/r/20211212065241.GA886691@odroid --- mm/slab.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mm/slab.h') diff --git a/mm/slab.h b/mm/slab.h index f14e723b9e3c..95b9a74a2d51 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -50,8 +50,8 @@ struct slab { struct list_head slab_list; void *__unused_1; void *freelist; /* first free block */ - void *__unused_2; - int units; + long units; + unsigned int __unused_2; #else #error "Unexpected slab allocator configured" -- cgit v1.2.3