hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/eventfd.h
....@@ -14,7 +14,6 @@
1414 #include <linux/err.h>
1515 #include <linux/percpu-defs.h>
1616 #include <linux/percpu.h>
17
-#include <linux/sched.h>
1817
1918 /*
2019 * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining
....@@ -44,9 +43,11 @@
4443 int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
4544 __u64 *cnt);
4645
47
-static inline bool eventfd_signal_allowed(void)
46
+DECLARE_PER_CPU(int, eventfd_wake_count);
47
+
48
+static inline bool eventfd_signal_count(void)
4849 {
49
- return !current->in_eventfd_signal;
50
+ return this_cpu_read(eventfd_wake_count);
5051 }
5152
5253 #else /* CONFIG_EVENTFD */
....@@ -83,9 +84,9 @@
8384 return -ENOSYS;
8485 }
8586
86
-static inline bool eventfd_signal_allowed(void)
87
+static inline bool eventfd_signal_count(void)
8788 {
88
- return true;
89
+ return false;
8990 }
9091
9192 #endif