Re: [PATCH v1 2/2] fuse: use iomap helpers to update folio uptodate state
Christoph Hellwig <[email protected]> Wed, 24 Jun 2026 09:36:25 +0200
| Newsgroups | dev.linux.lists.fuse-devel,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jun 24, 2026 at 04:29:54AM +0100, Matthew Wilcox wrote: > I believe this to be a bug. I talked about this a bit as LSFMM, but the > fundamental problem is that the folio uptodate flag DOES NOT BELONG TO THE > FILESYSTEM (unlike the buffer_head uptodate flag, which definitely does). > > The MM has a number of sanity checks that make sure we haven't > done something awful like mapping a !uptodate folio into userspace. > That would potentially leak confidential information to userspace. > So when a filesystem clears the uptodate flag, the MM can come along > and bring down the whole machine because the mapped folio is now !uptodate. > > I know we have a terrible writeback error handling story. But I think > the right thing to do is just take out the calls to clear uptodate. > In all filesystems. Darrick took it out of iomap in e9c3a8e820ed but > it's time to purge it everywhere. Yeah. We're not going to fix everything at once, but we should slowly move to stop clearing the folio uptodate bit. And I suspect the same is trye for the sub-folio uptodate bits.