]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/mm_types.h
userfaultfd: add vm_userfaultfd_ctx to the vm_area_struct
[karo-tx-linux.git] / include / linux / mm_types.h
index 15549578d55998e5497c5da58a50fa1531e132d8..26a30c3566f0c751b66174fe8813a005f00a817d 100644 (file)
@@ -256,6 +256,16 @@ struct vm_region {
                                                * this region */
 };
 
+#ifdef CONFIG_USERFAULTFD
+#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) { NULL, })
+struct vm_userfaultfd_ctx {
+       struct userfaultfd_ctx *ctx;
+};
+#else /* CONFIG_USERFAULTFD */
+#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) {})
+struct vm_userfaultfd_ctx {};
+#endif /* CONFIG_USERFAULTFD */
+
 /*
  * This struct defines a memory VMM memory area. There is one of these
  * per VM-area/task.  A VM area is any part of the process virtual memory
@@ -322,6 +332,7 @@ struct vm_area_struct {
 #ifdef CONFIG_NUMA
        struct mempolicy *vm_policy;    /* NUMA policy for the VMA */
 #endif
+       struct vm_userfaultfd_ctx vm_userfaultfd_ctx;
 };
 
 struct core_thread {