lkml.org 
[lkml]   [2023]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v11 2/7] userfaultfd: Define dummy uffd_wp_range()
Date
Define uffd_wp_range() for the cases when CONFIG_USERFAULTFD isn't set.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
include/linux/userfaultfd_k.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index b680c0ec8b85..fd1a1ecdb5f6 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -182,6 +182,14 @@ extern int userfaultfd_wp_async(struct vm_area_struct *vma);

#else /* CONFIG_USERFAULTFD */

+extern inline long uffd_wp_range(struct mm_struct *dst_mm,
+ struct vm_area_struct *vma,
+ unsigned long start, unsigned long len,
+ bool enable_wp)
+{
+ return 0;
+}
+
/* mm helpers */
static inline vm_fault_t handle_userfault(struct vm_fault *vmf,
unsigned long reason)
--
2.39.2
\
 
 \ /
  Last update: 2023-03-27 00:51    [W:0.293 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site