On Tue, Jul 23, 2019 at 10:58:38AM -0700, Ira Weiny wrote:
> > @@ -1092,7 +1092,7 @@ int chtls_sendmsg(struct sock *sk, struct msghdr
> > *msg, size_t size)
> > if (page && off == pg_size) {
> > put_page(page);
> > TCP_PAGE(sk) = page = NULL;
> > - pg_size = PAGE_SIZE;
> > + pg_size = 0;
>
> Yea... I was not sure about this one at first... :-/
I'm not sure we actually need to change pg_size here, but it seemed
appropriate to set it back to 0.
> > __GFP_NORETRY,
> > order);
> > - if (page)
> > - pg_size <<= order;
> > }
> > if (!page) {
> > page = alloc_page(gfp);
> > - pg_size = PAGE_SIZE;
> > }
> > if (!page)
> > goto wait_for_memory;
>
> Side note: why 2 checks for !page?
Because page is assigned to after the first check ...