Lines Matching refs:zctx

94 	struct zstd_ctx *zctx = ctx->context;  in zstd_destroy()  local
96 if (!zctx) in zstd_destroy()
106 if (zctx->cctx_mem) in zstd_destroy()
107 vfree(zctx->cctx_mem); in zstd_destroy()
109 zstd_free_cctx(zctx->cctx); in zstd_destroy()
111 if (zctx->dctx_mem) in zstd_destroy()
112 vfree(zctx->dctx_mem); in zstd_destroy()
114 zstd_free_dctx(zctx->dctx); in zstd_destroy()
116 kfree(zctx); in zstd_destroy()
121 struct zstd_ctx *zctx; in zstd_create() local
125 zctx = kzalloc(sizeof(*zctx), GFP_KERNEL); in zstd_create()
126 if (!zctx) in zstd_create()
129 ctx->context = zctx; in zstd_create()
133 zctx->cctx_mem = vzalloc(sz); in zstd_create()
134 if (!zctx->cctx_mem) in zstd_create()
137 zctx->cctx = zstd_init_cctx(zctx->cctx_mem, sz); in zstd_create()
138 if (!zctx->cctx) in zstd_create()
142 zctx->dctx_mem = vzalloc(sz); in zstd_create()
143 if (!zctx->dctx_mem) in zstd_create()
146 zctx->dctx = zstd_init_dctx(zctx->dctx_mem, sz); in zstd_create()
147 if (!zctx->dctx) in zstd_create()
152 zctx->cctx = zstd_create_cctx_advanced(zp->custom_mem); in zstd_create()
153 if (!zctx->cctx) in zstd_create()
156 zctx->dctx = zstd_create_dctx_advanced(zp->custom_mem); in zstd_create()
157 if (!zctx->dctx) in zstd_create()
173 struct zstd_ctx *zctx = ctx->context; in zstd_compress() local
177 ret = zstd_compress_cctx(zctx->cctx, req->dst, req->dst_len, in zstd_compress()
180 ret = zstd_compress_using_cdict(zctx->cctx, req->dst, in zstd_compress()
194 struct zstd_ctx *zctx = ctx->context; in zstd_decompress() local
198 ret = zstd_decompress_dctx(zctx->dctx, req->dst, req->dst_len, in zstd_decompress()
201 ret = zstd_decompress_using_ddict(zctx->dctx, req->dst, in zstd_decompress()