On Mon, Nov 02, 2020 at 06:42:57PM +0000, Matthew Wilcox (Oracle) wrote: > +static unsigned mapping_get_read_thps(struct address_space *mapping, > + pgoff_t index, unsigned int nr_pages, struct page **pages) This function could really use a comment describing it, as the name isn't overly descriptive. > +{ > + XA_STATE(xas, &mapping->i_pages, index); > + struct page *head; > + unsigned int ret = 0; I'd rename ret to nr_found to be a little more descriptive. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>