diff options
author | Michal Koutný <mkoutny@suse.com> | 2022-08-26 19:52:37 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2022-08-26 23:57:41 +0300 |
commit | fa7e439cf90ba23ea473d0b7d85efd02ae6ccf94 (patch) | |
tree | 9361bef45e46f7ba7fd29ea16ca23405cfbfce97 /include/linux/cgroup.h | |
parent | 4534dee941056a4ab9dca4a9e2edff28692800b2 (diff) | |
download | linux-fa7e439cf90ba23ea473d0b7d85efd02ae6ccf94.tar.xz |
cgroup: Homogenize cgroup_get_from_id() return value
Cgroup id is user provided datum hence extend its return domain to
include possible error reason (similar to cgroup_get_from_fd()).
This change also fixes commit d4ccaf58a847 ("bpf: Introduce cgroup
iter") that would use NULL instead of proper error handling in
d4ccaf58a847 ("bpf: Introduce cgroup iter").
Additionally, neither of: fc_appid_store, bpf_iter_attach_cgroup,
mem_cgroup_get_from_ino (callers of cgroup_get_from_fd) is built without
CONFIG_CGROUPS (depends via CONFIG_BLK_CGROUP, direct, transitive
CONFIG_MEMCG respectively) transitive, so drop the singular definition
not needed with !CONFIG_CGROUPS.
Fixes: d4ccaf58a847 ("bpf: Introduce cgroup iter")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 4d143729b246..30ee8ce2665e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -750,11 +750,6 @@ static inline bool task_under_cgroup_hierarchy(struct task_struct *task, static inline void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen) {} - -static inline struct cgroup *cgroup_get_from_id(u64 id) -{ - return NULL; -} #endif /* !CONFIG_CGROUPS */ #ifdef CONFIG_CGROUPS |