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)
commit671f2fa8a2b2d15940d80be4a2baf22758724647
tree60af1e4ec7d1a2410efb4efdf5180329bddb677a
parent85a34107eba913a2cb7c7c47c49f50073bfb67dd
zsmalloc: use correct types in _first_obj_offset functions

Since commit ffedd09fa9b0 ("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: ffedd09fa9b0 ("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