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

Reply via email to