Skip to content

Commit 0dbae46

Browse files
mzaslonkakpm00
authored andcommitted
lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0
This commit is based on: zlib-ng/zlib-ng@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>
1 parent 195c5ad commit 0dbae46

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/zlib_dfltcc/dfltcc_deflate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ int dfltcc_deflate(
142142
/* Clear history. */
143143
if (flush == Z_FULL_FLUSH)
144144
param->hl = 0;
145-
*result = need_more;
145+
/* Trigger block post-processing if necessary. */
146+
*result = no_flush ? need_more : block_done;
146147
return 1;
147148
}
148149

0 commit comments

Comments
 (0)