Lines Matching refs:compr
105 struct ubifs_compressor *compr = ubifs_compressors[*compr_type];
114 if (compr->comp_mutex)
115 mutex_lock(compr->comp_mutex);
116 err = crypto_comp_compress(compr->cc, in_buf, in_len, out_buf,
118 if (compr->comp_mutex)
119 mutex_unlock(compr->comp_mutex);
122 in_len, compr->name, err);
157 struct ubifs_compressor *compr;
164 compr = ubifs_compressors[compr_type];
166 if (unlikely(!compr->capi_name)) {
167 ubifs_err(c, "%s compression is not compiled in", compr->name);
177 if (compr->decomp_mutex)
178 mutex_lock(compr->decomp_mutex);
179 err = crypto_comp_decompress(compr->cc, in_buf, in_len, out_buf,
181 if (compr->decomp_mutex)
182 mutex_unlock(compr->decomp_mutex);
185 in_len, compr->name, err);
192 * @compr: compressor description object
197 static int __init compr_init(struct ubifs_compressor *compr)
199 if (compr->capi_name) {
200 compr->cc = crypto_alloc_comp(compr->capi_name, 0, 0);
201 if (IS_ERR(compr->cc)) {
203 current->pid, compr->name, PTR_ERR(compr->cc));
204 return PTR_ERR(compr->cc);
208 ubifs_compressors[compr->compr_type] = compr;
214 * @compr: compressor description object
216 static void compr_exit(struct ubifs_compressor *compr)
218 if (compr->capi_name)
219 crypto_free_comp(compr->cc);