mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
Subsystems (2)
PATCH 1/1 mm: zswap: use ATOMIC_LONG_INIT to initialize zswap_stored_pages
This is currently the only atomic_long_t variable initialized by ATOMIC_INIT macro found in the kernel by usinggrep -r atomic_long_t | grep ATOMIC_INIT
Signed-off-by Sun YangKai <[email protected]>
--- mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/zswap.c +1 -1
@@ -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
Signature · 1 line
2.48.1
Nhat Pham
maintainerQuoted 5 lines · Sun YangKai
This is currently the only
atomic_long_tvariable initialized byATOMIC_INITmacro found in the kernel by usinggrep -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.
Quoted 10 lines
Signed-off-by Sun YangKai <[email protected]>--- mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/zswap.c +0
-0
mm/zswap.c line 46
Quoted 5 lines
mm/zswap.c +1
-1@@ -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 :)