linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N
@ 2024-06-29 23:22 Barry Song
  2024-07-01  2:54 ` Chengming Zhou
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Barry Song @ 2024-06-29 23:22 UTC (permalink / raw)
  To: akpm, linux-mm
  Cc: linux-kernel, Barry Song, Yosry Ahmed, Nhat Pham, Chengming Zhou,
	Chris Li, David Hildenbrand, Johannes Weiner, Matthew Wilcox

From: Barry Song <v-songbaohua@oppo.com>

If CONFIG_ZSWAP is set to N, it means zswap cannot be enabled.
zswap_never_enabled() should return true.

Fixes: 0300e17d67c3 ("mm: zswap: add zswap_never_enabled()")
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Chris Li <chrisl@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/zswap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/zswap.h b/include/linux/zswap.h
index bf83ae5e285d..6cecb4a4f68b 100644
--- a/include/linux/zswap.h
+++ b/include/linux/zswap.h
@@ -68,7 +68,7 @@ static inline bool zswap_is_enabled(void)
 
 static inline bool zswap_never_enabled(void)
 {
-	return false;
+	return true;
 }
 
 #endif
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-03 23:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29 23:22 [PATCH] mm: zswap: fix zswap_never_enabled() for CONFIG_ZSWAP==N Barry Song
2024-07-01  2:54 ` Chengming Zhou
2024-07-01 13:32 ` Yosry Ahmed
2024-07-01 17:58 ` Chris Li
2024-07-02  6:52 ` Andrew Morton
2024-07-02  7:00   ` Barry Song
2024-07-02 11:58   ` Yosry Ahmed
2024-07-03  2:02     ` Andrew Morton
2024-07-02  6:58 ` David Hildenbrand
2024-07-03 23:22 ` Nhat Pham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).