Commit e9359f00 authored by Sergey Senozhatsky's avatar Sergey Senozhatsky Committed by Kaixiong Yu
Browse files

mm: Kconfig: fixup zsmalloc configuration

mainline inclusion
from mainline-v6.12-rc1
commit 5ad7a998ba921e37d7e373a2d70d7da401b27f94
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBET92

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5ad7a998ba921e37d7e373a2d70d7da401b27f94

--------------------------------

zsmalloc is not exclusive to zswap.  Commit b3fbd58f ("mm: Kconfig:
simplify zswap configuration") made CONFIG_ZSMALLOC only visible when
CONFIG_ZSWAP is selected, which makes it impossible to menuconfig
zsmalloc-specific features (stats, chain-size, etc.) on systems that use
ZRAM but don't have ZSWAP enabled.

Make zsmalloc depend on both ZRAM and ZSWAP.

Link: https://lkml.kernel.org/r/20240903040143.1580705-1-senozhatsky@chromium.org


Fixes: b3fbd58f ("mm: Kconfig: simplify zswap configuration")
Signed-off-by: default avatarSergey Senozhatsky <senozhatsky@chromium.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarKaixiong Yu <yukaixiong@huawei.com>
parent 2db9b571
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ config Z3FOLD

config ZSMALLOC
	tristate
	prompt "N:1 compression allocator (zsmalloc)" if ZSWAP
	prompt "N:1 compression allocator (zsmalloc)" if (ZSWAP || ZRAM)
	depends on MMU
	help
	  zsmalloc is a slab-based memory allocator designed to store