diff options
Diffstat (limited to 'include/linux/cgroup.h')
| -rw-r--r-- | include/linux/cgroup.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 0297f930a56e..f6b048902d6c 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -131,6 +131,8 @@ void cgroup_free(struct task_struct *p); | |||
| 131 | int cgroup_init_early(void); | 131 | int cgroup_init_early(void); |
| 132 | int cgroup_init(void); | 132 | int cgroup_init(void); |
| 133 | 133 | ||
| 134 | int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v); | ||
| 135 | |||
| 134 | /* | 136 | /* |
| 135 | * Iteration helpers and macros. | 137 | * Iteration helpers and macros. |
| 136 | */ | 138 | */ |
| @@ -697,6 +699,7 @@ void cgroup_path_from_kernfs_id(const union kernfs_node_id *id, | |||
| 697 | struct cgroup_subsys_state; | 699 | struct cgroup_subsys_state; |
| 698 | struct cgroup; | 700 | struct cgroup; |
| 699 | 701 | ||
| 702 | static inline void css_get(struct cgroup_subsys_state *css) {} | ||
| 700 | static inline void css_put(struct cgroup_subsys_state *css) {} | 703 | static inline void css_put(struct cgroup_subsys_state *css) {} |
| 701 | static inline int cgroup_attach_task_all(struct task_struct *from, | 704 | static inline int cgroup_attach_task_all(struct task_struct *from, |
| 702 | struct task_struct *t) { return 0; } | 705 | struct task_struct *t) { return 0; } |
| @@ -934,4 +937,22 @@ static inline bool cgroup_task_frozen(struct task_struct *task) | |||
| 934 | 937 | ||
| 935 | #endif /* !CONFIG_CGROUPS */ | 938 | #endif /* !CONFIG_CGROUPS */ |
| 936 | 939 | ||
| 940 | #ifdef CONFIG_CGROUP_BPF | ||
| 941 | static inline void cgroup_bpf_get(struct cgroup *cgrp) | ||
| 942 | { | ||
| 943 | percpu_ref_get(&cgrp->bpf.refcnt); | ||
| 944 | } | ||
| 945 | |||
| 946 | static inline void cgroup_bpf_put(struct cgroup *cgrp) | ||
| 947 | { | ||
| 948 | percpu_ref_put(&cgrp->bpf.refcnt); | ||
| 949 | } | ||
| 950 | |||
| 951 | #else /* CONFIG_CGROUP_BPF */ | ||
| 952 | |||
| 953 | static inline void cgroup_bpf_get(struct cgroup *cgrp) {} | ||
| 954 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} | ||
| 955 | |||
| 956 | #endif /* CONFIG_CGROUP_BPF */ | ||
| 957 | |||
| 937 | #endif /* _LINUX_CGROUP_H */ | 958 | #endif /* _LINUX_CGROUP_H */ |
