aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e2ffcdc26cb7..72154fb44fb5 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -457,6 +457,12 @@ static inline bool cgroup_sane_behavior(const struct cgroup *cgrp)
457 return cgrp->root->flags & CGRP_ROOT_SANE_BEHAVIOR; 457 return cgrp->root->flags & CGRP_ROOT_SANE_BEHAVIOR;
458} 458}
459 459
460/* no synchronization, the result can only be used as a hint */
461static inline bool cgroup_has_tasks(struct cgroup *cgrp)
462{
463 return !list_empty(&cgrp->cset_links);
464}
465
460/* returns ino associated with a cgroup, 0 indicates unmounted root */ 466/* returns ino associated with a cgroup, 0 indicates unmounted root */
461static inline ino_t cgroup_ino(struct cgroup *cgrp) 467static inline ino_t cgroup_ino(struct cgroup *cgrp)
462{ 468{
@@ -516,8 +522,6 @@ int cgroup_rm_cftypes(struct cftype *cfts);
516 522
517bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); 523bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor);
518 524
519int cgroup_task_count(const struct cgroup *cgrp);
520
521/* 525/*
522 * Control Group taskset, used to pass around set of tasks to cgroup_subsys 526 * Control Group taskset, used to pass around set of tasks to cgroup_subsys
523 * methods. 527 * methods.