diff --git a/src/core/bpf-foreign.c b/src/core/bpf-foreign.c index 6b93b9785f..686c14ce1f 100644 --- a/src/core/bpf-foreign.c +++ b/src/core/bpf-foreign.c @@ -111,16 +111,6 @@ static int bpf_foreign_prepare( return 0; } -int bpf_foreign_supported(void) { - int r; - - r = cg_all_unified(); - if (r <= 0) - return r; - - return path_is_mount_point("/sys/fs/bpf", NULL, 0); -} - int bpf_foreign_install(Unit *u) { _cleanup_free_ char *cgroup_path = NULL; CGroupBPFForeignProgram *p; diff --git a/src/core/bpf-foreign.h b/src/core/bpf-foreign.h index 9559cd7981..e387b1b1d3 100644 --- a/src/core/bpf-foreign.h +++ b/src/core/bpf-foreign.h @@ -4,7 +4,10 @@ #include "unit.h" -int bpf_foreign_supported(void); +static inline int bpf_foreign_supported(void) { + return cg_all_unified(); +} + /* * Attach cgroup-bpf programs foreign to systemd, i.e. loaded to the kernel by an entity * external to systemd.