Re: [PATCH v3 03/15] mm: abstract vma_address() and introduce vma_anon_address()

"David Hildenbrand (Arm)" <[email protected]>
Newsgroups gmane.linux.file-systems,gmane.linux.kernel.mm,gmane.linux.kernel
Message-ID <[email protected]>
On 7/29/26 18:48, Lorenzo Stoakes (ARM) wrote:
> Introduce __vma_address() which abstracts the VMA start page offset field
> as pgoff_start, then update vma_address() to use it.
> 
> Then introduce vma_anon_address() which does the equivalent of
> vma_address(), only using the anonymous page offset of the VMA rather than
> the file-backed one.
> 
> Also add an assert to ensure that the function is not called for mappings
> which are file-backed but not MAP_PRIVATE to ensure it is only used in the
> correct places.
> 
> This will be necessary for determining the address of a folio's index
> within a VMA when the folio belongs to a MAP_PRIVATE file-backed VMA but
> has been CoW'd, and thus is anonymous, once the anonymous VMA page offset
> field is used for the reverse mapping.
> 
> No callers are updated, so no functional change intended.
> 
> Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
> ---

Acked-by: David Hildenbrand (Arm) <[email protected]>

-- 
Cheers,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.