Home
last modified time | relevance | path

Searched refs:zstrm (Results 1 – 3 of 3) sorted by relevance

/Linux-v5.4/drivers/block/zram/
Dzcomp.c35 static void zcomp_strm_free(struct zcomp_strm *zstrm) in zcomp_strm_free() argument
37 if (!IS_ERR_OR_NULL(zstrm->tfm)) in zcomp_strm_free()
38 crypto_free_comp(zstrm->tfm); in zcomp_strm_free()
39 free_pages((unsigned long)zstrm->buffer, 1); in zcomp_strm_free()
40 kfree(zstrm); in zcomp_strm_free()
49 struct zcomp_strm *zstrm = kmalloc(sizeof(*zstrm), GFP_KERNEL); in zcomp_strm_alloc() local
50 if (!zstrm) in zcomp_strm_alloc()
53 zstrm->tfm = crypto_alloc_comp(comp->name, 0, 0); in zcomp_strm_alloc()
58 zstrm->buffer = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1); in zcomp_strm_alloc()
59 if (IS_ERR_OR_NULL(zstrm->tfm) || !zstrm->buffer) { in zcomp_strm_alloc()
[all …]
Dzcomp.h33 int zcomp_compress(struct zcomp_strm *zstrm,
36 int zcomp_decompress(struct zcomp_strm *zstrm,
Dzram_drv.c1257 struct zcomp_strm *zstrm = zcomp_stream_get(zram->comp); in __zram_bvec_read() local
1260 ret = zcomp_decompress(zstrm, src, size, dst); in __zram_bvec_read()
1315 struct zcomp_strm *zstrm; in __zram_bvec_write() local
1331 zstrm = zcomp_stream_get(zram->comp); in __zram_bvec_write()
1333 ret = zcomp_compress(zstrm, src, &comp_len); in __zram_bvec_write()
1386 src = zstrm->buffer; in __zram_bvec_write()