diff --git a/include/linux/version_compat_defs.h b/include/linux/version_compat_defs.h index a83b8871598e1..3f46e852bdc93 100644 --- a/include/linux/version_compat_defs.h +++ b/include/linux/version_compat_defs.h @@ -233,6 +233,17 @@ static inline void dma_fence_set_error_helper( } #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 static inline void kbase_unpin_user_buf_page(struct page *page) {