summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-09-30 14:19:21 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-30 14:19:39 +0200
commit4e3b5b02235d19e5bf535a5a6a4af40a3700b0e3 (patch)
treef46721316cc0c7c3b31f3788ef7bd8b4efc7175e /fs
parent7c797eb87385522ce1ec1ba44315ba386d82978d (diff)
downloadbarebox-4e3b5b02235d19e5bf535a5a6a4af40a3700b0e3.tar.gz
Revert "lib: zstd: sync with Linux"
This was part of a larger series that made it possible to use other compression algos than LZO for device tree and to use zstd more widely for barebox and kernel compression. The latter zstd-related parts needed rework and were not merged, but the zstd update was applied. It broken in turn the UBIFS zstd support. As we get nothing out of the update without the not applied commits that need rework anyway, revert this commit. This reverts commit b4a9782d4f56333e897dccc35c2c27e2605f6b93. Reported-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220929102537.1767458-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/zstd_wrapper.c4
-rw-r--r--fs/ubifs/ubifs.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/squashfs/zstd_wrapper.c b/fs/squashfs/zstd_wrapper.c
index aae981f6ce..86740edd48 100644
--- a/fs/squashfs/zstd_wrapper.c
+++ b/fs/squashfs/zstd_wrapper.c
@@ -39,7 +39,7 @@ static void *zstd_init(struct squashfs_sb_info *msblk, void *buff)
goto failed;
wksp->window_size = max_t(size_t,
msblk->block_size, SQUASHFS_METADATA_SIZE);
- wksp->mem_size = zstd_dstream_workspace_bound(wksp->window_size);
+ wksp->mem_size = ZSTD_DStreamWorkspaceBound(wksp->window_size);
wksp->mem = vmalloc(wksp->mem_size);
if (wksp->mem == NULL)
goto failed;
@@ -75,7 +75,7 @@ static int zstd_uncompress(struct squashfs_sb_info *msblk, void *strm,
ZSTD_inBuffer in_buf = { NULL, 0, 0 };
ZSTD_outBuffer out_buf = { NULL, 0, 0 };
- stream = zstd_init_dstream(wksp->window_size, wksp->mem, wksp->mem_size);
+ stream = ZSTD_initDStream(wksp->window_size, wksp->mem, wksp->mem_size);
if (!stream) {
ERROR("Failed to initialize zstd decompressor\n");
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 71ccd2c0e7..6f2ea14d0e 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -533,13 +533,13 @@ static int zlib_decomp_init(void)
static int zstd_decomp_init(void)
{
- const size_t wksp_size = zstd_dctx_workspace_bound();
+ const size_t wksp_size = ZSTD_DCtxWorkspaceBound();
void *wksp = malloc(wksp_size);
if (!wksp)
return -ENOMEM;
- ubifs_zstd_cctx = zstd_init_dctx(wksp, wksp_size);
+ ubifs_zstd_cctx = ZSTD_initDCtx(wksp, wksp_size);
if (!ubifs_zstd_cctx)
return -EINVAL;