On Fri, Sep 06, 2019 at 03:09:44PM +0300, Kirill A. Shutemov wrote: > On Thu, Sep 05, 2019 at 11:23:47AM -0700, Matthew Wilcox wrote: > > +next: > > + xas_store(&xas, page); > > + if (++i < nr) { > > + xas_next(&xas); > > + goto next; > > } > > Can we have a proper loop here instead of goto? > > do { > xas_store(&xas, page); > /* Do not move xas ouside the range */ > if (++i != nr) > xas_next(&xas); > } while (i < nr); We could. I wanted to keep it as close to the shmem.c code as possible, and this code is scheduled to go away once we're using a single large entry in the xarray instead of N consecutive entries.