[PATCH v3 23/23] mm/vma: convert __mmap_region() to use vma_flags_t

Vlastimil Babka (SUSE) vbabka at kernel.org
Fri Mar 20 21:51:08 AEDT 2026


On 3/18/26 16:50, Lorenzo Stoakes (Oracle) wrote:
> Update the mmap() implementation logic implemented in __mmap_region() and
> functions invoked by it.  The mmap_region() function converts its input
> vm_flags_t parameter to a vma_flags_t value which it then passes to
> __mmap_region() which uses the vma_flags_t value consistently from then
> on.
> 
> As part of the change, we convert map_deny_write_exec() to using
> vma_flags_t (it was incorrectly using unsigned long before), and place it
> in vma.h, as it is only used internal to mm.
> 
> With this change, we eliminate the legacy is_shared_maywrite_vm_flags()
> helper function which is now no longer required.
> 
> We are also able to update the MMAP_STATE() and VMG_MMAP_STATE() macros to
> use the vma_flags_t value.
> 
> Finally, we update the VMA tests to reflect the change.
> 
> Signed-off-by: Lorenzo Stoakes (Oracle) <ljs at kernel.org>

Acked-by: Vlastimil Babka (SUSE) <vbabka at kernel.org>



More information about the Linuxppc-dev mailing list