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-02 22:50:08 -0800 |
commit | 0dbae46550363c88cf073aafc0e0b244b9f43555 (patch) | |
tree | 3b0d8cab349d3e7e3f16109baec420942ede3b67 /lib/zlib_dfltcc | |
parent | 195c5ad9d179dbea1c9026f2af5b3eb77f8205b3 (diff) | |
download | lwn-0dbae46550363c88cf073aafc0e0b244b9f43555.tar.gz lwn-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/zlib_dfltcc')
-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; } |