summaryrefslogtreecommitdiff
path: root/fs/erofs/decompressor_zstd.c
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2024-07-09 17:41:05 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2024-07-09 19:04:40 +0800
commit5a7cce827ee9e2c56fcecf5cda0ad39d9568283d (patch)
treefd095065fcaecb69d06e10d76b9c9ec0628c2b8f /fs/erofs/decompressor_zstd.c
parent392d20ccef22cb471856f41860737e6306bee0b9 (diff)
erofs: refine z_erofs_{init,exit}_subsystem()
Introduce z_erofs_{init,exit}_decompressor() to unexport z_erofs_{deflate,lzma,zstd}_{init,exit}(). Besides, call them in z_erofs_{init,exit}_subsystem() for simplicity. Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20240709094106.3018109-2-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/erofs/decompressor_zstd.c')
-rw-r--r--fs/erofs/decompressor_zstd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/erofs/decompressor_zstd.c b/fs/erofs/decompressor_zstd.c
index e8f931d41e60..49415bc40d7c 100644
--- a/fs/erofs/decompressor_zstd.c
+++ b/fs/erofs/decompressor_zstd.c
@@ -34,7 +34,7 @@ again:
return strm;
}
-void z_erofs_zstd_exit(void)
+static void z_erofs_zstd_exit(void)
{
while (z_erofs_zstd_avail_strms) {
struct z_erofs_zstd *strm, *n;
@@ -49,7 +49,7 @@ void z_erofs_zstd_exit(void)
}
}
-int __init z_erofs_zstd_init(void)
+static int __init z_erofs_zstd_init(void)
{
/* by default, use # of possible CPUs instead */
if (!z_erofs_zstd_nstrms)
@@ -281,5 +281,7 @@ failed_zinit:
const struct z_erofs_decompressor z_erofs_zstd_decomp = {
.config = z_erofs_load_zstd_config,
.decompress = z_erofs_zstd_decompress,
+ .init = z_erofs_zstd_init,
+ .exit = z_erofs_zstd_exit,
.name = "zstd",
};