@@ -707,7 +707,7 @@ static int zswap_dstmem_prepare(unsigned int cpu)
struct mutex *mutex;
u8 *dst;
- dst = kmalloc_node(PAGE_SIZE * 2, GFP_KERNEL, cpu_to_node(cpu));
+ dst = kmalloc_node(PAGE_SIZE, GFP_KERNEL, cpu_to_node(cpu));
if (!dst)
return -ENOMEM;
@@ -1662,8 +1662,7 @@ bool zswap_store(struct folio *folio)
sg_init_table(&input, 1);
sg_set_page(&input, page, PAGE_SIZE, 0);
- /* zswap_dstmem is of size (PAGE_SIZE * 2). Reflect same in sg_list */
- sg_init_one(&output, dst, PAGE_SIZE * 2);
+ sg_init_one(&output, dst, PAGE_SIZE);
acomp_request_set_params(acomp_ctx->req, &input, &output, PAGE_SIZE, dlen);
/*
* it maybe looks a little bit silly that we send an asynchronous request,