> On Jul 3, 2024, at 1:08 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Tue, Jul 02, 2024 at 05:33:58PM -0400, David Wysochanski wrote: > > [annoying full quote snipped] > >> Was your test running both reads and truncates on the same file in parallel? >> >> Once the read completes I believe the page is unlocked. Then if >> truncates are running in parallel, then I think this can happen >> (folio->mapping = NULL as a result of truncate). > > Yes, folio->mapping is only stable when the folio is locked. So Dave, I haven't tested the patch you posted a couple days ago, because there hasn't been a clear answer about whether nfs_read_folio() needs to protect itself against the ->mapping changing, in which case, that's probably a better fix. -- Chuck Lever