version_compat_defs: Add vm_flags_set()/vm_flags_clear()

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8812670a600bdc9cf13ce0d89893a71a5d971e43
This commit is contained in:
Tao Huang
2024-02-06 16:56:55 +08:00
parent 1feee0d9c0
commit 9ced5e9ae9

View File

@@ -233,6 +233,17 @@ static inline void dma_fence_set_error_helper(
}
#include <linux/mm.h>
#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)
{