* [PATCH] [fix] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
@ 2025-02-26 8:04 Sun YangKai
2025-02-26 8:20 ` Nhat Pham
0 siblings, 1 reply; 2+ messages in thread
From: Sun YangKai @ 2025-02-26 8:04 UTC (permalink / raw)
To: nphamcs
Cc: Sun YangKai, Johannes Weiner, Yosry Ahmed, Chengming Zhou,
Andrew Morton, open list:ZSWAP COMPRESSED SWAP CACHING,
open list
This is currently the only atomic_long_t variable initialized by
ATOMIC_INIT macro found in the kernel by using
`grep -r atomic_long_t | grep ATOMIC_INIT`
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
---
mm/zswap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zswap.c b/mm/zswap.c
index ac9d299e7d0c..23365e76a3ce 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -43,7 +43,7 @@
* statistics
**********************************/
/* The number of compressed pages currently stored in zswap */
-atomic_long_t zswap_stored_pages = ATOMIC_INIT(0);
+atomic_long_t zswap_stored_pages = ATOMIC_LONG_INIT(0);
/*
* The statistics below are not protected from concurrent access for
--
2.48.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [fix] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
2025-02-26 8:04 [PATCH] [fix] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages Sun YangKai
@ 2025-02-26 8:20 ` Nhat Pham
0 siblings, 0 replies; 2+ messages in thread
From: Nhat Pham @ 2025-02-26 8:20 UTC (permalink / raw)
To: Sun YangKai
Cc: Johannes Weiner, Yosry Ahmed, Chengming Zhou, Andrew Morton,
open list:ZSWAP COMPRESSED SWAP CACHING, open list
On Wed, Feb 26, 2025 at 12:04 AM Sun YangKai <sunk67188@gmail.com> wrote:
>
> This is currently the only atomic_long_t variable initialized by
> ATOMIC_INIT macro found in the kernel by using
> `grep -r atomic_long_t | grep ATOMIC_INIT`
>
nit: patch description seems non-descriptive. Perhaps you can add some
context - when was this issue first introduced into our codebase?
Also, I think you'll need a fix tag:
Fixes: 6e1fa55 ("mm: zswap: modify zswap_stored_pages to be atomic_long_t")
since the atomic_long_t type was introduced by that patch.
> Signed-off-by: Sun YangKai <sunk67188@gmail.com>
> ---
> mm/zswap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index ac9d299e7d0c..23365e76a3ce 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -43,7 +43,7 @@
> * statistics
> **********************************/
> /* The number of compressed pages currently stored in zswap */
> -atomic_long_t zswap_stored_pages = ATOMIC_INIT(0);
> +atomic_long_t zswap_stored_pages = ATOMIC_LONG_INIT(0);
Code itself LGTM FWIW :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-26 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-26 8:04 [PATCH] [fix] mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages Sun YangKai
2025-02-26 8:20 ` Nhat Pham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox