Lines Matching refs:scratch
70 struct scomp_scratch *scratch; in crypto_scomp_free_scratches() local
74 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_free_scratches()
76 vfree(scratch->src); in crypto_scomp_free_scratches()
77 vfree(scratch->dst); in crypto_scomp_free_scratches()
78 scratch->src = NULL; in crypto_scomp_free_scratches()
79 scratch->dst = NULL; in crypto_scomp_free_scratches()
85 struct scomp_scratch *scratch; in crypto_scomp_alloc_scratches() local
91 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_alloc_scratches()
96 scratch->src = mem; in crypto_scomp_alloc_scratches()
100 scratch->dst = mem; in crypto_scomp_alloc_scratches()
126 struct scomp_scratch *scratch; in scomp_acomp_comp_decomp() local
138 scratch = raw_cpu_ptr(&scomp_scratch); in scomp_acomp_comp_decomp()
139 spin_lock(&scratch->lock); in scomp_acomp_comp_decomp()
141 scatterwalk_map_and_copy(scratch->src, req->src, 0, req->slen, 0); in scomp_acomp_comp_decomp()
143 ret = crypto_scomp_compress(scomp, scratch->src, req->slen, in scomp_acomp_comp_decomp()
144 scratch->dst, &req->dlen, *ctx); in scomp_acomp_comp_decomp()
146 ret = crypto_scomp_decompress(scomp, scratch->src, req->slen, in scomp_acomp_comp_decomp()
147 scratch->dst, &req->dlen, *ctx); in scomp_acomp_comp_decomp()
156 scatterwalk_map_and_copy(scratch->dst, req->dst, 0, req->dlen, in scomp_acomp_comp_decomp()
160 spin_unlock(&scratch->lock); in scomp_acomp_comp_decomp()