]> git.baikalelectronics.ru Git - kernel.git/commit
zsmalloc: use correct types in _first_obj_offset functions
authorAlexey Romanov <avromanov@sberdevices.ru>
Fri, 9 Sep 2022 08:37:22 +0000 (11:37 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:07 +0000 (14:03 -0700)
commit736a8ab1d4f9e19cea6ebf6c225ac9a19131c3ce
tree60af1e4ec7d1a2410efb4efdf5180329bddb677a
parent4be87460974311ce413815c34d9a08b3781cb14e
zsmalloc: use correct types in _first_obj_offset functions

Since commit 8ced2c16b34a ("zsmalloc: Stop using slab fields in struct
page") we are using page->page_type (unsigned int) field instead of
page->units (int) as first object offset in a subpage of zspage.  So
get_first_obj_offset() and set_first_obj_offset() functions should work
with unsigned int type.

Link: https://lkml.kernel.org/r/20220909083722.85024-1-avromanov@sberdevices.ru
Fixes: 8ced2c16b34a ("zsmalloc: Stop using slab fields in struct page")
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Alexey Romanov <avromanov@sberdevices.ru>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zsmalloc.c