preempt.h: Kill dependency on list.h
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 15 Dec 2023 21:04:03 +0000 (16:04 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 27 Dec 2023 16:49:56 +0000 (11:49 -0500)
We really only need types.h, list.h is big.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/preempt.h

index 9aa6358a1a16b4b2670034165da2c184d48ff476..7233e9cf1bab60a46037172fa5468706c8e3a232 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/linkage.h>
 #include <linux/cleanup.h>
-#include <linux/list.h>
+#include <linux/types.h>
 
 /*
  * We put the hardirq and softirq counter into the preemption
@@ -360,7 +360,9 @@ void preempt_notifier_unregister(struct preempt_notifier *notifier);
 static inline void preempt_notifier_init(struct preempt_notifier *notifier,
                                     struct preempt_ops *ops)
 {
-       INIT_HLIST_NODE(&notifier->link);
+       /* INIT_HLIST_NODE() open coded, to avoid dependency on list.h */
+       notifier->link.next = NULL;
+       notifier->link.pprev = NULL;
        notifier->ops = ops;
 }