From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 08:20:59 +0000
Subject: [PATCH] kernel_5.10 no rt

---
 kernel/include/linux/eventfd.h |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/kernel/include/linux/eventfd.h b/kernel/include/linux/eventfd.h
index 3f24ec0..ce1cf42 100644
--- a/kernel/include/linux/eventfd.h
+++ b/kernel/include/linux/eventfd.h
@@ -14,7 +14,6 @@
 #include <linux/err.h>
 #include <linux/percpu-defs.h>
 #include <linux/percpu.h>
-#include <linux/sched.h>
 
 /*
  * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining
@@ -44,9 +43,11 @@
 int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
 				  __u64 *cnt);
 
-static inline bool eventfd_signal_allowed(void)
+DECLARE_PER_CPU(int, eventfd_wake_count);
+
+static inline bool eventfd_signal_count(void)
 {
-	return !current->in_eventfd_signal;
+	return this_cpu_read(eventfd_wake_count);
 }
 
 #else /* CONFIG_EVENTFD */
@@ -83,9 +84,9 @@
 	return -ENOSYS;
 }
 
-static inline bool eventfd_signal_allowed(void)
+static inline bool eventfd_signal_count(void)
 {
-	return true;
+	return false;
 }
 
 #endif

--
Gitblit v1.6.2