Commit 9364f17b authored by Wentao Liang's avatar Wentao Liang Committed by Kent Overstreet
Browse files

bcachefs: Add error handling for zlib_deflateInit2()



In attempt_compress(), the return value of zlib_deflateInit2() needs to be
checked. A proper implementation can be found in  pstore_compress().

Add an error check and return 0 immediately if the initialzation fails.

Fixes: 986e9842 ("bcachefs: Compression levels")
Signed-off-by: default avatarWentao Liang <vulab@iscas.ac.cn>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent a07c43e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment