diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-04-29 18:05:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-02-17 16:07:48 +0300 |
commit | a3b89864554bbce1594b7abdb5739fc708c1ca95 (patch) | |
tree | 52159e3930fe4eb3e12228061634137e0e713a73 /include | |
parent | 8ecca39483ed4e4e97096d0d6f8e25fdd323b189 (diff) | |
download | linux-a3b89864554bbce1594b7abdb5739fc708c1ca95.tar.xz |
rbtree, perf: Use new rbtree helpers
Reduce rbtree boiler plate by using the new helpers.
One noteworthy change is unification of the various (partial) compare
functions. We construct a subtree match by forcing the sub-order to
always match, see __group_cmp().
Due to 'const' we had to touch cgroup_id().
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 451c2d26a5db..4f2f79de083e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -307,7 +307,7 @@ void css_task_iter_end(struct css_task_iter *it); * Inline functions. */ -static inline u64 cgroup_id(struct cgroup *cgrp) +static inline u64 cgroup_id(const struct cgroup *cgrp) { return cgrp->kn->id; } @@ -701,7 +701,7 @@ void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen); struct cgroup_subsys_state; struct cgroup; -static inline u64 cgroup_id(struct cgroup *cgrp) { return 1; } +static inline u64 cgroup_id(const struct cgroup *cgrp) { return 1; } static inline void css_get(struct cgroup_subsys_state *css) {} static inline void css_put(struct cgroup_subsys_state *css) {} static inline int cgroup_attach_task_all(struct task_struct *from, |