Lines Matching refs:zip_ctx

72 static int zip_ctx_init(struct zip_kernel_ctx *zip_ctx, int lzs_flag)  in zip_ctx_init()  argument
74 struct zip_operation *comp_ctx = &zip_ctx->zip_comp; in zip_ctx_init()
75 struct zip_operation *decomp_ctx = &zip_ctx->zip_decomp; in zip_ctx_init()
110 static void zip_ctx_exit(struct zip_kernel_ctx *zip_ctx) in zip_ctx_exit() argument
112 struct zip_operation *comp_ctx = &zip_ctx->zip_comp; in zip_ctx_exit()
113 struct zip_operation *dec_ctx = &zip_ctx->zip_decomp; in zip_ctx_exit()
124 struct zip_kernel_ctx *zip_ctx) in zip_compress() argument
131 if (!zip_ctx || !src || !dst || !dlen) in zip_compress()
142 zip_ops = &zip_ctx->zip_comp; in zip_compress()
160 struct zip_kernel_ctx *zip_ctx) in zip_decompress() argument
167 if (!zip_ctx || !src || !dst || !dlen) in zip_decompress()
178 zip_ops = &zip_ctx->zip_decomp; in zip_decompress()
201 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_deflate() local
203 return zip_ctx_init(zip_ctx, 0); in zip_alloc_comp_ctx_deflate()
208 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_lzs() local
210 return zip_ctx_init(zip_ctx, 1); in zip_alloc_comp_ctx_lzs()
215 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_free_comp_ctx() local
217 zip_ctx_exit(zip_ctx); in zip_free_comp_ctx()
224 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_compress() local
226 return zip_compress(src, slen, dst, dlen, zip_ctx); in zip_comp_compress()
233 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_decompress() local
235 return zip_decompress(src, slen, dst, dlen, zip_ctx); in zip_comp_decompress()
242 struct zip_kernel_ctx *zip_ctx; in zip_alloc_scomp_ctx_deflate() local
244 zip_ctx = kzalloc(sizeof(*zip_ctx), GFP_KERNEL); in zip_alloc_scomp_ctx_deflate()
245 if (!zip_ctx) in zip_alloc_scomp_ctx_deflate()
248 ret = zip_ctx_init(zip_ctx, 0); in zip_alloc_scomp_ctx_deflate()
251 kfree_sensitive(zip_ctx); in zip_alloc_scomp_ctx_deflate()
255 return zip_ctx; in zip_alloc_scomp_ctx_deflate()
261 struct zip_kernel_ctx *zip_ctx; in zip_alloc_scomp_ctx_lzs() local
263 zip_ctx = kzalloc(sizeof(*zip_ctx), GFP_KERNEL); in zip_alloc_scomp_ctx_lzs()
264 if (!zip_ctx) in zip_alloc_scomp_ctx_lzs()
267 ret = zip_ctx_init(zip_ctx, 1); in zip_alloc_scomp_ctx_lzs()
270 kfree_sensitive(zip_ctx); in zip_alloc_scomp_ctx_lzs()
274 return zip_ctx; in zip_alloc_scomp_ctx_lzs()
279 struct zip_kernel_ctx *zip_ctx = ctx; in zip_free_scomp_ctx() local
281 zip_ctx_exit(zip_ctx); in zip_free_scomp_ctx()
282 kfree_sensitive(zip_ctx); in zip_free_scomp_ctx()
289 struct zip_kernel_ctx *zip_ctx = ctx; in zip_scomp_compress() local
291 return zip_compress(src, slen, dst, dlen, zip_ctx); in zip_scomp_compress()
298 struct zip_kernel_ctx *zip_ctx = ctx; in zip_scomp_decompress() local
300 return zip_decompress(src, slen, dst, dlen, zip_ctx); in zip_scomp_decompress()