summaryrefslogtreecommitdiff
path: root/fs/erofs/decompressor_deflate.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_deflate.c
parent392d20ccef22cb471856f41860737e6306bee0b9 (diff)
downloadlwn-5a7cce827ee9e2c56fcecf5cda0ad39d9568283d.tar.gz
lwn-5a7cce827ee9e2c56fcecf5cda0ad39d9568283d.zip
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_deflate.c')
-rw-r--r--fs/erofs/decompressor_deflate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/erofs/decompressor_deflate.c b/fs/erofs/decompressor_deflate.c
index 1c0ed77dcdb2..79232ef15654 100644
--- a/fs/erofs/decompressor_deflate.c
+++ b/fs/erofs/decompressor_deflate.c
@@ -15,7 +15,7 @@ static DECLARE_WAIT_QUEUE_HEAD(z_erofs_deflate_wq);
module_param_named(deflate_streams, z_erofs_deflate_nstrms, uint, 0444);
-void z_erofs_deflate_exit(void)
+static void z_erofs_deflate_exit(void)
{
/* there should be no running fs instance */
while (z_erofs_deflate_avail_strms) {
@@ -41,7 +41,7 @@ void z_erofs_deflate_exit(void)
}
}
-int __init z_erofs_deflate_init(void)
+static int __init z_erofs_deflate_init(void)
{
/* by default, use # of possible CPUs instead */
if (!z_erofs_deflate_nstrms)
@@ -256,5 +256,7 @@ failed_zinit:
const struct z_erofs_decompressor z_erofs_deflate_decomp = {
.config = z_erofs_load_deflate_config,
.decompress = z_erofs_deflate_decompress,
+ .init = z_erofs_deflate_init,
+ .exit = z_erofs_deflate_exit,
.name = "deflate",
};