Lines Matching refs:strm
22 struct z_erofs_deflate *strm; in z_erofs_deflate_exit() local
25 strm = z_erofs_deflate_head; in z_erofs_deflate_exit()
26 if (!strm) { in z_erofs_deflate_exit()
33 while (strm) { in z_erofs_deflate_exit()
34 struct z_erofs_deflate *n = strm->next; in z_erofs_deflate_exit()
36 vfree(strm->z.workspace); in z_erofs_deflate_exit()
37 kfree(strm); in z_erofs_deflate_exit()
39 strm = n; in z_erofs_deflate_exit()
72 struct z_erofs_deflate *strm; in z_erofs_load_deflate_config() local
74 strm = kzalloc(sizeof(*strm), GFP_KERNEL); in z_erofs_load_deflate_config()
75 if (!strm) in z_erofs_load_deflate_config()
78 strm->z.workspace = vmalloc(zlib_inflate_workspacesize()); in z_erofs_load_deflate_config()
79 if (!strm->z.workspace) { in z_erofs_load_deflate_config()
80 kfree(strm); in z_erofs_load_deflate_config()
85 strm->next = z_erofs_deflate_head; in z_erofs_load_deflate_config()
86 z_erofs_deflate_head = strm; in z_erofs_load_deflate_config()
111 struct z_erofs_deflate *strm; in z_erofs_deflate_decompress() local
126 strm = z_erofs_deflate_head; in z_erofs_deflate_decompress()
127 if (!strm) { in z_erofs_deflate_decompress()
132 z_erofs_deflate_head = strm->next; in z_erofs_deflate_decompress()
136 zerr = zlib_inflateInit2(&strm->z, -MAX_WBITS); in z_erofs_deflate_decompress()
143 strm->z.avail_in = min(rq->inputsize, PAGE_SIZE - rq->pageofs_in); in z_erofs_deflate_decompress()
144 rq->inputsize -= strm->z.avail_in; in z_erofs_deflate_decompress()
145 strm->z.next_in = dctx.kin + rq->pageofs_in; in z_erofs_deflate_decompress()
146 strm->z.avail_out = 0; in z_erofs_deflate_decompress()
147 dctx.bounce = strm->bounce; in z_erofs_deflate_decompress()
150 dctx.avail_out = strm->z.avail_out; in z_erofs_deflate_decompress()
151 dctx.inbuf_sz = strm->z.avail_in; in z_erofs_deflate_decompress()
153 (void **)&strm->z.next_out, in z_erofs_deflate_decompress()
154 (void **)&strm->z.next_in, pgpl); in z_erofs_deflate_decompress()
157 strm->z.avail_out = dctx.avail_out; in z_erofs_deflate_decompress()
158 strm->z.avail_in = dctx.inbuf_sz; in z_erofs_deflate_decompress()
160 zerr = zlib_inflate(&strm->z, Z_SYNC_FLUSH); in z_erofs_deflate_decompress()
161 if (zerr != Z_OK || !(rq->outputsize + strm->z.avail_out)) { in z_erofs_deflate_decompress()
172 if (zlib_inflateEnd(&strm->z) != Z_OK && !err) in z_erofs_deflate_decompress()
180 strm->next = z_erofs_deflate_head; in z_erofs_deflate_decompress()
181 z_erofs_deflate_head = strm; in z_erofs_deflate_decompress()