Lines Matching refs:scratch
63 struct scomp_scratch *scratch; in crypto_scomp_free_scratches() local
67 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_free_scratches()
69 vfree(scratch->src); in crypto_scomp_free_scratches()
70 vfree(scratch->dst); in crypto_scomp_free_scratches()
71 scratch->src = NULL; in crypto_scomp_free_scratches()
72 scratch->dst = NULL; in crypto_scomp_free_scratches()
78 struct scomp_scratch *scratch; in crypto_scomp_alloc_scratches() local
84 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_alloc_scratches()
89 scratch->src = mem; in crypto_scomp_alloc_scratches()
93 scratch->dst = mem; in crypto_scomp_alloc_scratches()
119 struct scomp_scratch *scratch; in scomp_acomp_comp_decomp() local
134 scratch = raw_cpu_ptr(&scomp_scratch); in scomp_acomp_comp_decomp()
135 spin_lock(&scratch->lock); in scomp_acomp_comp_decomp()
137 scatterwalk_map_and_copy(scratch->src, req->src, 0, req->slen, 0); in scomp_acomp_comp_decomp()
139 ret = crypto_scomp_compress(scomp, scratch->src, req->slen, in scomp_acomp_comp_decomp()
140 scratch->dst, &req->dlen, *ctx); in scomp_acomp_comp_decomp()
142 ret = crypto_scomp_decompress(scomp, scratch->src, req->slen, in scomp_acomp_comp_decomp()
143 scratch->dst, &req->dlen, *ctx); in scomp_acomp_comp_decomp()
155 scatterwalk_map_and_copy(scratch->dst, req->dst, 0, req->dlen, in scomp_acomp_comp_decomp()
159 spin_unlock(&scratch->lock); in scomp_acomp_comp_decomp()