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:Wentao Liang <vulab@iscas.ac.cn> Signed-off-by:
Kent Overstreet <kent.overstreet@linux.dev>
Loading
Please sign in to comment