Commit 0dbae465 authored by Mikhail Zaslonko's avatar Mikhail Zaslonko Committed by Andrew Morton
Browse files

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: default avatarMikhail Zaslonko <zaslonko@linux.ibm.com>
Acked-by: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 195c5ad9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }