Thread (30 messages) 30 messages, 3 authors, 2022-05-13
STALE1521d

[RFC PATCH bpf-next 7/9] cgroup: Add cgroup_put() in !CONFIG_CGROUPS case

From: Yosry Ahmed <hidden>
Date: 2022-05-10 00:19:05
Also in: bpf, cgroups, lkml
Subsystem: control group (cgroup), the rest · Maintainers: Tejun Heo, Johannes Weiner, Michal Koutný, Linus Torvalds

From: Hao Luo <redacted>

There is already a cgroup_get_from_id() in the !CONFIG_CGROUPS case,
let's have a matching cgroup_put() in !CONFIG_CGROUPS too.

Signed-off-by: Hao Luo <redacted>
Signed-off-by: Yosry Ahmed <redacted>
---
 include/linux/cgroup.h | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 5408c74d5c44..4f1d8febb9fd 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -759,6 +759,9 @@ static inline struct cgroup *cgroup_get_from_id(u64 id)
 {
 	return NULL;
 }
+
+static inline struct cgroup *cgroup_put(void)
+{}
 #endif /* !CONFIG_CGROUPS */
 
 #ifdef CONFIG_CGROUPS
-- 
2.36.0.512.ge40c2bad7a-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help