]> 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)
commit4c01c34458a092c51fce57b9f2c156f278e09d17
tree60af1e4ec7d1a2410efb4efdf5180329bddb677a
parent78b10bc7813b24481b3180c35f57ff160e4471ef
zsmalloc: use correct types in _first_obj_offset functions

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