diff options
author | Mikhail Zaslonko <zaslonko@linux.ibm.com> | 2023-01-26 14:14:24 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-03 07:50:08 +0100 |
commit | 0dbae46550363c88cf073aafc0e0b244b9f43555 (patch) | |
tree | 3b0d8cab349d3e7e3f16109baec420942ede3b67 /lib | |
parent | lib/zlib: fix DFLTCC not flushing EOBS when creating raw streams (diff) | |
download | linux-0dbae46550363c88cf073aafc0e0b244b9f43555.tar.xz linux-0dbae46550363c88cf073aafc0e0b244b9f43555.zip |
lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0
This commit is based on:
https://github.com/zlib-ng/zlib-ng/commit/40acb3f
Link: https://lkml.kernel.org/r/20230126131428.1222214-5-zaslonko@linux.ibm.com
Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zlib_dfltcc/dfltcc_deflate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c index dc85ec890163..211d344710d5 100644 --- a/lib/zlib_dfltcc/dfltcc_deflate.c +++ b/lib/zlib_dfltcc/dfltcc_deflate.c @@ -142,7 +142,8 @@ again: /* Clear history. */ if (flush == Z_FULL_FLUSH) param->hl = 0; - *result = need_more; + /* Trigger block post-processing if necessary. */ + *result = no_flush ? need_more : block_done; return 1; } |