Re: [PATCH 2/5] userfaultfd, shmem: use a VMA callback to handle UFFDIO_CONTINUE
From: Mike Rapoport
Date: Tue Nov 25 2025 - 09:29:21 EST
On Mon, Nov 24, 2025 at 12:03:17PM +0100, David Hildenbrand (Red Hat) wrote:
> On 11/23/25 11:27, Mike Rapoport wrote:
> > From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>
> >
> > When userspace resolves a page fault in a shmem VMA with UFFDIO_CONTINUE
> > it needs to get a folio that already exists in the pagecache backing
> > that VMA.
> >
> > Instead of using shmem_get_folio() for that, add a get_pagecache_folio()
>
> get_shared_folio()
>
> Given that the helper now no longer receives a VMA, I assume we can just
> really call it get_folio() and the "shared" part would be implicit. (from
> the inode)
It makes naming shmem_vm_ops.get_folio harder, because we already have
shmem_get_folio :)
I'll think of something.
> --
> Cheers
> David
--
Sincerely yours,
Mike.