diff options
| author | Gao Xiang <hsiangkao@linux.alibaba.com> | 2024-07-09 17:41:04 +0800 |
|---|---|---|
| committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2024-07-09 19:04:40 +0800 |
| commit | 392d20ccef22cb471856f41860737e6306bee0b9 (patch) | |
| tree | 9c87bcbd5be24a564d663a5315c20d72001e367a /fs/erofs/decompressor_zstd.c | |
| parent | 2080ca1ed3e43233c4e8480c0b9d2840886de01e (diff) | |
| download | linux-next-392d20ccef22cb471856f41860737e6306bee0b9.tar.gz linux-next-392d20ccef22cb471856f41860737e6306bee0b9.zip | |
erofs: move each decompressor to its own source file
Thus *_config() function declarations can be avoided.
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240709094106.3018109-1-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/erofs/decompressor_zstd.c')
| -rw-r--r-- | fs/erofs/decompressor_zstd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/erofs/decompressor_zstd.c b/fs/erofs/decompressor_zstd.c index 63a23cac3af4..e8f931d41e60 100644 --- a/fs/erofs/decompressor_zstd.c +++ b/fs/erofs/decompressor_zstd.c @@ -72,7 +72,7 @@ int __init z_erofs_zstd_init(void) return 0; } -int z_erofs_load_zstd_config(struct super_block *sb, +static int z_erofs_load_zstd_config(struct super_block *sb, struct erofs_super_block *dsb, void *data, int size) { static DEFINE_MUTEX(zstd_resize_mutex); @@ -135,8 +135,8 @@ int z_erofs_load_zstd_config(struct super_block *sb, return strm ? -ENOMEM : 0; } -int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq, - struct page **pgpl) +static int z_erofs_zstd_decompress(struct z_erofs_decompress_req *rq, + struct page **pgpl) { const unsigned int nrpages_out = PAGE_ALIGN(rq->pageofs_out + rq->outputsize) >> PAGE_SHIFT; @@ -277,3 +277,9 @@ failed_zinit: wake_up(&z_erofs_zstd_wq); return err; } + +const struct z_erofs_decompressor z_erofs_zstd_decomp = { + .config = z_erofs_load_zstd_config, + .decompress = z_erofs_zstd_decompress, + .name = "zstd", +}; |
