* + mm-zswap-interact-directly-with-zsmalloc-fix.patch added to mm-unstable branch
@ 2025-09-16 3:18 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-16 3:18 UTC (permalink / raw)
To: mm-commits, zhouchengming, yosry.ahmed, vitaly.wool, sj, nphamcs,
hannes, akpm
The patch titled
Subject: mm: zswap: interact directly with zsmalloc fix
has been added to the -mm mm-unstable branch. Its filename is
mm-zswap-interact-directly-with-zsmalloc-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-zswap-interact-directly-with-zsmalloc-fix.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Johannes Weiner <hannes@cmpxchg.org>
Subject: mm: zswap: interact directly with zsmalloc fix
Date: Mon, 15 Sep 2025 10:56:15 -0400
Yosry points out that the default compressor check only applies when
something else is configured and we fall back, but not if it was
configured out of the box but isn't available. Move the test. Kconfig
should not permit this, so replace the pr_err() with a WARN.
Link: https://lkml.kernel.org/r/20250915153640.GA828739@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Vitaly Wool <vitaly.wool@konsulko.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zswap.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/mm/zswap.c~mm-zswap-interact-directly-with-zsmalloc-fix
+++ a/mm/zswap.c
@@ -306,12 +306,12 @@ static struct zswap_pool *__zswap_pool_c
zswap_compressor, CONFIG_ZSWAP_COMPRESSOR_DEFAULT);
param_free_charp(&zswap_compressor);
zswap_compressor = CONFIG_ZSWAP_COMPRESSOR_DEFAULT;
- if (!crypto_has_acomp(zswap_compressor, 0, 0)) {
- pr_err("default compressor %s not available\n",
- zswap_compressor);
- zswap_compressor = ZSWAP_PARAM_UNSET;
- return NULL;
- }
+ }
+
+ /* Default compressor should be available. Kconfig bug? */
+ if (WARN_ON_ONCE(!crypto_has_acomp(zswap_compressor, 0, 0))) {
+ zswap_compressor = ZSWAP_PARAM_UNSET;
+ return NULL;
}
return zswap_pool_create(zswap_compressor);
_
Patches currently in -mm which might be from hannes@cmpxchg.org are
mm-zswap-interact-directly-with-zsmalloc.patch
mm-zswap-interact-directly-with-zsmalloc-fix.patch
mm-remove-unused-zpool-layer.patch
mm-zpdesc-minor-naming-and-comment-corrections.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-16 3:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 3:18 + mm-zswap-interact-directly-with-zsmalloc-fix.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.