On Mon, Jan 17, 2022 at 04:59:35PM +0000, David Howells wrote: > Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > > > + if (folio_test_uptodate(folio)) > > > + goto out_put_folio; > > > > Er ... if (!folio_test_uptodate(folio)), perhaps? And is it even > > worth testing if read_mapping_folio() returned success? I feel like > > we should take ->readpage()'s word for it that success means the > > folio is now uptodate. > > Actually, no, I shouldn't need to do this since it comes out with the page > lock still held. No. The page is unlocked upon IO completion. After calling ->readpage, folio_wait_locked(folio);