On Mon, Nov 02, 2020 at 06:42:57PM +0000, Matthew Wilcox (Oracle) wrote: > Add mapping_get_read_thps() which returns the THPs which represent a > contiguous array of bytes in the file. It also stops when encountering > a page marked as Readahead or !Uptodate (but does return that page) > so it can be handled appropriately by filemap_get_pages(). That lets us > remove the loop in filemap_get_pages() and check only the last page. > > Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Reviewed-by: Kent Overstreet <kent.overstreet@xxxxxxxxx>