Re: [v5 PATCH 10/14] crypto: acomp - Add support for folios

Herbert Xu
2025-03-19T10:02:53Z

On Sat, Mar 15, 2025 at 06:30:40PM +0800, Herbert Xu wrote:
>
> - n = slen / PAGE_SIZE;
> - n += (offset_in_page(slen) + soff - 1) / PAGE_SIZE;
> - if (slen <= req->src->length &&
> - (!PageHighMem(nth_page(spage, n)) ||
> - size_add(soff, slen) <= PAGE_SIZE))
> + spage = nth_page(spage, soff / PAGE_SIZE);
> + soff = offset_in_page(soff);
> +
> + n = slen / PAGE_SIZE;
> + n += (offset_in_page(slen) + soff - 1) / PAGE_SIZE;
> + if (PageHighMem(nth_page(spage, n)) &&
> + size_add(soff, slen) <= PAGE_SIZE)
> + break;

This should of course be

size_add(soff, slen) > PAGE_SIZE

> + if (PageHighMem(dpage + n) &&
> + size_add(doff, dlen) <= PAGE_SIZE)

Ditto.

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt