diff options
| author | Lorenzo Stoakes <lorenzo.stoakes@oracle.com> | 2025-11-21 17:25:18 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-11-24 15:08:55 -0800 |
| commit | ccf9eb326b4aabcd61e71d87469cafd6c5f01308 (patch) | |
| tree | f35eed4dc4fe3a7009534dc0e168143ef4a91326 | |
| parent | 04d31610a7221cca624646241b1f6b3edd6c99fd (diff) | |
tools/testing/vma: add missing stub
vm_flags_reset() is not available in the userland VMA tests, so add a stub
which const-casts vma->vm_flags and avoids the upcoming removal of the
vma->__vm_flags field.
Link: https://lkml.kernel.org/r/4aff8bf7-d367-4ba3-90ad-13eef7a063fa@lucifer.local
Fixes: c5c67c1de357 ("tools/testing/vma: eliminate dependency on vma->__vm_flags")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| -rw-r--r-- | tools/testing/vma/vma_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/vma/vma_internal.h b/tools/testing/vma/vma_internal.h index be99056c5d56..8c2ac301a00e 100644 --- a/tools/testing/vma/vma_internal.h +++ b/tools/testing/vma/vma_internal.h @@ -1549,4 +1549,11 @@ static inline int do_munmap(struct mm_struct *, unsigned long, size_t, return 0; } +static inline void vm_flags_reset(struct vm_area_struct *vma, vm_flags_t flags) +{ + vm_flags_t *dst = (vm_flags_t *)(&vma->vm_flags); + + *dst = flags; +} + #endif /* __MM_VMA_INTERNAL_H */ |
