diff --git a/mm/zswap.c b/mm/zswap.c index 9dec853647c8..47c0386caba2 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1086,7 +1086,8 @@ static void zswap_decompress(struct zswap_entry *entry, struct page *page) zpool_unmap_handle(zpool, entry->handle); } - sg_init_one(&input, src, entry->length); + sg_init_table(&input, 1); + sg_set_page(&input, kmap_to_page(src), entry->length, offset_in_page(src)); sg_init_table(&output, 1); sg_set_page(&output, page, PAGE_SIZE, 0); acomp_request_set_params(acomp_ctx->req, &input, &output, entry->length, PAGE_SIZE);