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>
This commit is contained in:
Mikhail Zaslonko 2023-01-26 14:14:24 +01:00 committed by Andrew Morton
parent 195c5ad9d1
commit 0dbae46550
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}