Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > if (folio_lock_killable(folio) < 0) > > goto out; > > + if (folio->mapping != mapping) { > > + ret = VM_FAULT_NOPAGE | VM_FAULT_LOCKED; > > + goto out; > > + } > > Have you tested this? I've tried to. generic/247 can trigger it, but the race happens rarely. > I'd expect it to throw some VM assertions. I didn't see any. I guess VM_FAULT_LOCKED is not universally handled by the caller and that I should unlock the folio myself instead. David