[PATCH v3 29/40] mm: drop some redundant checks around hugetlb VMAs

David Hildenbrand (Arm) david at kernel.org
Thu Oct 1 23:54:42 PDT 2026


On 9/17/26 18:22, Lorenzo Stoakes (ARM) wrote:
> Adjust code which inadvertently perform redundant checks on hugetlb VMAs
> and clean them up:
> 
> * hugetlb VMAs have VMA_DONTEXPAND_BIT set so a VMA_SPECIAL_FLAGS check
>   suffices. (migrate_vma_setup() regains an explicit hugetlb test later in
>   the series, once VMA_SPECIAL_FLAGS is removed.)
> 
> * hugetlb VMAs unconditionally set vma->vm_ops, so they are never
>   anonymous.
> 
> * hugetlb VMAs do not set VMA_PFNMAP_BIT so checking for this is redundant.
> 
> While we're here also drop a VM_BUG_ON() which the simplified check above
> makes unreachable, and use the new VMA flag API.
> 
> No functional change intended.
> 
> Acked-by: Marc Zyngier <maz at kernel.org>
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
> ---

Acked-by: David Hildenbrand (Arm) <david at kernel.org>

-- 
Cheers,

David



More information about the kvm-riscv mailing list