diff --git a/include/linux/version_compat_defs.h b/include/linux/version_compat_defs.h index c9b1f62684d1c..9b136c024610b 100644 --- a/include/linux/version_compat_defs.h +++ b/include/linux/version_compat_defs.h @@ -76,4 +76,17 @@ typedef unsigned int __poll_t; #endif /* CONFIG_MMU */ #endif /* KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE */ +#include +#if !((KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE) || \ + ((KERNEL_VERSION(6, 1, 25) <= LINUX_VERSION_CODE) && defined(__ANDROID_COMMON_KERNEL__))) +static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags) +{ + vma->vm_flags |= flags; +} +static inline void vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags) +{ + vma->vm_flags &= ~flags; +} +#endif + #endif /* _VERSION_COMPAT_DEFS_H_ */