[PATCH bpf-next 5/5] bpf: push down the bpf-link include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Turns out bpf_link is not dereferenced or embedded much.
Since we have separated it out to its own header why not
drop the include from bpf.h completely...

Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
---
 include/linux/bpf.h   | 2 +-
 kernel/bpf/bpf_iter.c | 1 +
 kernel/bpf/syscall.c  | 1 +
 net/core/dev.c        | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 64bdae62a594..0be6890f01ec 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -23,12 +23,12 @@
 #include <linux/slab.h>
 #include <linux/percpu-refcount.h>
 #include <linux/bpf-cgroup-types.h>
-#include <linux/bpf-link.h>
 #include <linux/bpfptr.h>
 
 struct bpf_verifier_env;
 struct bpf_verifier_log;
 struct perf_event;
+struct bpf_link;
 struct bpf_prog;
 struct bpf_prog_aux;
 struct bpf_map;
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index b7aef5b3416d..9e4d00446227 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -5,6 +5,7 @@
 #include <linux/anon_inodes.h>
 #include <linux/filter.h>
 #include <linux/bpf.h>
+#include <linux/bpf-link.h>
 
 struct bpf_iter_target_info {
 	struct list_head list;
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index ddd81d543203..9034bb833ec3 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -5,6 +5,7 @@
 #include <linux/bpf_trace.h>
 #include <linux/bpf_lirc.h>
 #include <linux/bpf_verifier.h>
+#include <linux/bpf-link.h>
 #include <linux/btf.h>
 #include <linux/syscalls.h>
 #include <linux/slab.h>
diff --git a/net/core/dev.c b/net/core/dev.c
index 4420086f3aeb..d8e51e826852 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -93,6 +93,7 @@
 #include <linux/skbuff.h>
 #include <linux/kthread.h>
 #include <linux/bpf.h>
+#include <linux/bpf-link.h>
 #include <linux/bpf_trace.h>
 #include <net/net_namespace.h>
 #include <net/sock.h>
-- 
2.31.1




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux