Skip to content

Commit

Permalink
lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0
Browse files Browse the repository at this point in the history
This commit is based on:
  zlib-ng/zlib-ng@40acb3f

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Mikhail Zaslonko <[email protected]>
Acked-by: Ilya Leoshkevich <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
mzaslonk authored and akpm00 committed Feb 3, 2023
1 parent 195c5ad commit 0dbae46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/zlib_dfltcc/dfltcc_deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ int dfltcc_deflate(
/* 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;
}

Expand Down

0 comments on commit 0dbae46

Please sign in to comment.