# Re: \[PATCH 33/39\] mm: eliminate VMA\_SPECIAL\_FLAGS usage when hugetlb explicitly tested

- From: sashiko-bot@kernel.org
- Date: 2026-09-08 20:42:56 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2026/09/17533724
- Thread: https://ratatoskr.run/bpf/2026/09/17533522/t.md

```text
> It is now an invariant that VMA_IO_BIT is not set except by kernel-owned
> mappings, so each existing VMA_SPECIAL_FLAGS test need only test for
> VMA_DONTEXPAND_BIT, VMA_PFNMAP_BIT and VMA_MIXEDMAP_BIT.
> 
> This is precisely a test for a kernel-owned or fixed mapping.
> 
> Update a number of callsites which already explicitly handle hugetlb
> mappings.
> 
> vma_supports_mlock() and ksm_compatible() also explicitly bail on droppable
> mappings - detecting kernel-owned, fixed or droppable mappings is handled
> by vma_is_persistent(), so in these cases use this predicate.
> 
> should_skip_vma() tests for locked, kernel-owned or fixed memory (having
> already excluded hugetlb mappings) so simply test for those there.
> 
> No functional change intended.
> 
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-b4-mmap-prepare-vma-flag-sanify-v1-0-dacf19cce22b@kernel.org?part=33

```
