On Tue, May 29, 2018 at 11:11:46PM -0700, Darrick J. Wong wrote: > > + list_del(&page->lru); > > + if (!add_to_page_cache_lru(page, inode->i_mapping, page->index, > > + GFP_NOFS)) > > I'm curious about this line -- if add_to_page_cache_lru returns an > error, why don't we want to send that back up the stack? Is the idea > that the page doesn't become uptodate and something else notices? It > seems a little odd that on error we just skip to the next page. > > (If this /is/ correct then comment is needed here.) readpages is only used for read-ahead, so the upper layers literally don't care as long as we don't mess up the page refcount. This logic is taken straight from mpage_readpages, but I'll add a comment anyway.