summaryrefslogtreecommitdiff
path: root/fs/erofs/decompressor.c
diff options
context:
space:
mode:
authorYue Hu <huyue2@coolpad.com>2023-04-26 11:44:49 +0300
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-05-29 10:54:49 +0300
commit597e2953ae9b4a391e883c1f1a4cda5878e2dbed (patch)
tree5c13adc1ff379dad6964eef91bdb7d6dcbef6a73 /fs/erofs/decompressor.c
parent7877cb91f1081754a1487c144d85dc0d2e2e7fc4 (diff)
downloadlinux-597e2953ae9b4a391e883c1f1a4cda5878e2dbed.tar.xz
erofs: fold in z_erofs_decompress()
No need this helper since it's just a simple wrapper for decompress method and only one caller. So, let's fold in directly instead. Signed-off-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20230426084449.12781-1-zbestahu@gmail.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/decompressor.c')
-rw-r--r--fs/erofs/decompressor.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 7021e2cf6146..2a29943fa5cc 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -363,7 +363,7 @@ static int z_erofs_transform_plain(struct z_erofs_decompress_req *rq,
return 0;
}
-static struct z_erofs_decompressor decompressors[] = {
+const struct z_erofs_decompressor erofs_decompressors[] = {
[Z_EROFS_COMPRESSION_SHIFTED] = {
.decompress = z_erofs_transform_plain,
.name = "shifted"
@@ -383,9 +383,3 @@ static struct z_erofs_decompressor decompressors[] = {
},
#endif
};
-
-int z_erofs_decompress(struct z_erofs_decompress_req *rq,
- struct page **pagepool)
-{
- return decompressors[rq->alg].decompress(rq, pagepool);
-}