1 #ifndef _LINUX_CGROUP_H
2 #define _LINUX_CGROUP_H
6 * Copyright (C) 2003 BULL SA
7 * Copyright (C) 2004-2006 Silicon Graphics, Inc.
11 #include <linux/sched.h>
12 #include <linux/cpumask.h>
13 #include <linux/nodemask.h>
14 #include <linux/rcupdate.h>
15 #include <linux/rculist.h>
16 #include <linux/cgroupstats.h>
17 #include <linux/prio_heap.h>
18 #include <linux/rwsem.h>
19 #include <linux/idr.h>
20 #include <linux/workqueue.h>
21 #include <linux/xattr.h>
31 extern int cgroup_init_early(void);
32 extern int cgroup_init(void);
33 extern void cgroup_fork(struct task_struct
*p
);
34 extern void cgroup_post_fork(struct task_struct
*p
);
35 extern void cgroup_exit(struct task_struct
*p
, int run_callbacks
);
36 extern int cgroupstats_build(struct cgroupstats
*stats
,
37 struct dentry
*dentry
);
38 extern int cgroup_load_subsys(struct cgroup_subsys
*ss
);
39 extern void cgroup_unload_subsys(struct cgroup_subsys
*ss
);
41 extern const struct file_operations proc_cgroup_operations
;
44 * Define the enumeration of all cgroup subsystems.
46 * We define ids for builtin subsystems and then modular ones.
48 #define SUBSYS(_x) _x ## _subsys_id,
49 enum cgroup_subsys_id
{
50 #define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
51 #include <linux/cgroup_subsys.h>
52 #undef IS_SUBSYS_ENABLED
53 CGROUP_BUILTIN_SUBSYS_COUNT
,
55 __CGROUP_SUBSYS_TEMP_PLACEHOLDER
= CGROUP_BUILTIN_SUBSYS_COUNT
- 1,
57 #define IS_SUBSYS_ENABLED(option) IS_MODULE(option)
58 #include <linux/cgroup_subsys.h>
59 #undef IS_SUBSYS_ENABLED
64 /* Per-subsystem/per-cgroup state maintained by the system. */
65 struct cgroup_subsys_state
{
67 * The cgroup that this subsystem is attached to. Useful
68 * for subsystems that want to know about the cgroup
71 struct cgroup
*cgroup
;
74 * State maintained by the cgroup system to allow subsystems
75 * to be "busy". Should be accessed via css_get(),
76 * css_tryget() and css_put().
82 /* ID for this css, if possible */
83 struct css_id __rcu
*id
;
85 /* Used to put @cgroup->dentry on the last css_put() */
86 struct work_struct dput_work
;
89 /* bits in struct cgroup_subsys_state flags field */
91 CSS_ROOT
= (1 << 0), /* this CSS is the root of the subsystem */
92 CSS_ONLINE
= (1 << 1), /* between ->css_online() and ->css_offline() */
95 /* Caller must verify that the css is not for root cgroup */
96 static inline void __css_get(struct cgroup_subsys_state
*css
, int count
)
98 atomic_add(count
, &css
->refcnt
);
102 * Call css_get() to hold a reference on the css; it can be used
103 * for a reference obtained via:
104 * - an existing ref-counted reference to the css
105 * - task->cgroups for a locked task
108 static inline void css_get(struct cgroup_subsys_state
*css
)
110 /* We don't need to reference count the root state */
111 if (!(css
->flags
& CSS_ROOT
))
116 * Call css_tryget() to take a reference on a css if your existing
117 * (known-valid) reference isn't already ref-counted. Returns false if
118 * the css has been destroyed.
121 extern bool __css_tryget(struct cgroup_subsys_state
*css
);
122 static inline bool css_tryget(struct cgroup_subsys_state
*css
)
124 if (css
->flags
& CSS_ROOT
)
126 return __css_tryget(css
);
130 * css_put() should be called to release a reference taken by
131 * css_get() or css_tryget()
134 extern void __css_put(struct cgroup_subsys_state
*css
);
135 static inline void css_put(struct cgroup_subsys_state
*css
)
137 if (!(css
->flags
& CSS_ROOT
))
141 /* bits in struct cgroup flags field */
143 /* Control Group is dead */
146 * Control Group has previously had a child cgroup or a task,
147 * but no longer (only if CGRP_NOTIFY_ON_RELEASE is set)
150 /* Control Group requires release notifications to userspace */
151 CGRP_NOTIFY_ON_RELEASE
,
153 * Clone the parent's configuration when creating a new child
154 * cpuset cgroup. For historical reasons, this option can be
155 * specified at mount time and thus is implemented here.
157 CGRP_CPUSET_CLONE_CHILDREN
,
161 struct rcu_head rcu_head
;
166 unsigned long flags
; /* "unsigned long" so bitops work */
169 * count users of this cgroup. >0 means busy, but doesn't
170 * necessarily indicate the number of tasks in the cgroup
174 int id
; /* ida allocated in-hierarchy ID */
177 * We link our 'sibling' struct into our parent's 'children'.
178 * Our children link their 'sibling' into our 'children'.
180 struct list_head sibling
; /* my parent's children */
181 struct list_head children
; /* my children */
182 struct list_head files
; /* my files */
184 struct cgroup
*parent
; /* my parent */
185 struct dentry
*dentry
; /* cgroup fs entry, RCU protected */
188 * This is a copy of dentry->d_name, and it's needed because
189 * we can't use dentry->d_name in cgroup_path().
191 * You must acquire rcu_read_lock() to access cgrp->name, and
192 * the only place that can change it is rename(), which is
193 * protected by parent dir's i_mutex.
195 * Normally you should use cgroup_name() wrapper rather than
196 * access it directly.
198 struct cgroup_name __rcu
*name
;
200 /* Private pointers for each registered subsystem */
201 struct cgroup_subsys_state
*subsys
[CGROUP_SUBSYS_COUNT
];
203 struct cgroupfs_root
*root
;
204 struct cgroup
*top_cgroup
;
207 * List of cg_cgroup_links pointing at css_sets with
208 * tasks in this cgroup. Protected by css_set_lock
210 struct list_head css_sets
;
212 struct list_head allcg_node
; /* cgroupfs_root->allcg_list */
213 struct list_head cft_q_node
; /* used during cftype add/rm */
216 * Linked list running through all cgroups that can
217 * potentially be reaped by the release agent. Protected by
220 struct list_head release_list
;
223 * list of pidlists, up to two for each namespace (one for procs, one
224 * for tasks); created on demand.
226 struct list_head pidlists
;
227 struct mutex pidlist_mutex
;
229 /* For RCU-protected deletion */
230 struct rcu_head rcu_head
;
231 struct work_struct free_work
;
233 /* List of events which userspace want to receive */
234 struct list_head event_list
;
235 spinlock_t event_list_lock
;
237 /* directory xattrs */
238 struct simple_xattrs xattrs
;
242 * A css_set is a structure holding pointers to a set of
243 * cgroup_subsys_state objects. This saves space in the task struct
244 * object and speeds up fork()/exit(), since a single inc/dec and a
245 * list_add()/del() can bump the reference count on the entire cgroup
251 /* Reference count */
255 * List running through all cgroup groups in the same hash
256 * slot. Protected by css_set_lock
258 struct hlist_node hlist
;
261 * List running through all tasks using this cgroup
262 * group. Protected by css_set_lock
264 struct list_head tasks
;
267 * List of cg_cgroup_link objects on link chains from
268 * cgroups referenced from this css_set. Protected by
271 struct list_head cg_links
;
274 * Set of subsystem states, one for each subsystem. This array
275 * is immutable after creation apart from the init_css_set
276 * during subsystem registration (at boot time) and modular subsystem
279 struct cgroup_subsys_state
*subsys
[CGROUP_SUBSYS_COUNT
];
281 /* For RCU-protected deletion */
282 struct rcu_head rcu_head
;
286 * cgroup_map_cb is an abstract callback API for reporting map-valued
290 struct cgroup_map_cb
{
291 int (*fill
)(struct cgroup_map_cb
*cb
, const char *key
, u64 value
);
296 * struct cftype: handler definitions for cgroup control files
298 * When reading/writing to a file:
299 * - the cgroup to use is file->f_dentry->d_parent->d_fsdata
300 * - the 'cftype' of the file is file->f_dentry->d_fsdata
304 #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */
305 #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */
307 #define MAX_CFTYPE_NAME 64
311 * By convention, the name should begin with the name of the
312 * subsystem, followed by a period. Zero length string indicates
313 * end of cftype array.
315 char name
[MAX_CFTYPE_NAME
];
318 * If not 0, file mode is set to this value, otherwise it will
319 * be figured out automatically
324 * If non-zero, defines the maximum length of string that can
325 * be passed to write_string; defaults to 64
327 size_t max_write_len
;
333 struct simple_xattrs xattrs
;
335 int (*open
)(struct inode
*inode
, struct file
*file
);
336 ssize_t (*read
)(struct cgroup
*cgrp
, struct cftype
*cft
,
338 char __user
*buf
, size_t nbytes
, loff_t
*ppos
);
340 * read_u64() is a shortcut for the common case of returning a
341 * single integer. Use it in place of read()
343 u64 (*read_u64
)(struct cgroup
*cgrp
, struct cftype
*cft
);
345 * read_s64() is a signed version of read_u64()
347 s64 (*read_s64
)(struct cgroup
*cgrp
, struct cftype
*cft
);
349 * read_map() is used for defining a map of key/value
350 * pairs. It should call cb->fill(cb, key, value) for each
351 * entry. The key/value pairs (and their ordering) should not
352 * change between reboots.
354 int (*read_map
)(struct cgroup
*cont
, struct cftype
*cft
,
355 struct cgroup_map_cb
*cb
);
357 * read_seq_string() is used for outputting a simple sequence
360 int (*read_seq_string
)(struct cgroup
*cont
, struct cftype
*cft
,
363 ssize_t (*write
)(struct cgroup
*cgrp
, struct cftype
*cft
,
365 const char __user
*buf
, size_t nbytes
, loff_t
*ppos
);
368 * write_u64() is a shortcut for the common case of accepting
369 * a single integer (as parsed by simple_strtoull) from
370 * userspace. Use in place of write(); return 0 or error.
372 int (*write_u64
)(struct cgroup
*cgrp
, struct cftype
*cft
, u64 val
);
374 * write_s64() is a signed version of write_u64()
376 int (*write_s64
)(struct cgroup
*cgrp
, struct cftype
*cft
, s64 val
);
379 * write_string() is passed a nul-terminated kernelspace
380 * buffer of maximum length determined by max_write_len.
381 * Returns 0 or -ve error code.
383 int (*write_string
)(struct cgroup
*cgrp
, struct cftype
*cft
,
386 * trigger() callback can be used to get some kick from the
387 * userspace, when the actual string written is not important
388 * at all. The private field can be used to determine the
389 * kick type for multiplexing.
391 int (*trigger
)(struct cgroup
*cgrp
, unsigned int event
);
393 int (*release
)(struct inode
*inode
, struct file
*file
);
396 * register_event() callback will be used to add new userspace
397 * waiter for changes related to the cftype. Implement it if
398 * you want to provide this functionality. Use eventfd_signal()
399 * on eventfd to send notification to userspace.
401 int (*register_event
)(struct cgroup
*cgrp
, struct cftype
*cft
,
402 struct eventfd_ctx
*eventfd
, const char *args
);
404 * unregister_event() callback will be called when userspace
405 * closes the eventfd or on cgroup removing.
406 * This callback must be implemented, if you want provide
407 * notification functionality.
409 void (*unregister_event
)(struct cgroup
*cgrp
, struct cftype
*cft
,
410 struct eventfd_ctx
*eventfd
);
414 * cftype_sets describe cftypes belonging to a subsystem and are chained at
415 * cgroup_subsys->cftsets. Each cftset points to an array of cftypes
416 * terminated by zero length name.
419 struct list_head node
; /* chained at subsys->cftsets */
423 struct cgroup_scanner
{
425 int (*test_task
)(struct task_struct
*p
, struct cgroup_scanner
*scan
);
426 void (*process_task
)(struct task_struct
*p
,
427 struct cgroup_scanner
*scan
);
428 struct ptr_heap
*heap
;
432 /* Caller should hold rcu_read_lock() */
433 static inline const char *cgroup_name(const struct cgroup
*cgrp
)
435 return rcu_dereference(cgrp
->name
)->name
;
438 int cgroup_add_cftypes(struct cgroup_subsys
*ss
, struct cftype
*cfts
);
439 int cgroup_rm_cftypes(struct cgroup_subsys
*ss
, struct cftype
*cfts
);
441 int cgroup_is_removed(const struct cgroup
*cgrp
);
442 bool cgroup_is_descendant(struct cgroup
*cgrp
, struct cgroup
*ancestor
);
444 int cgroup_path(const struct cgroup
*cgrp
, char *buf
, int buflen
);
446 int cgroup_task_count(const struct cgroup
*cgrp
);
449 * Control Group taskset, used to pass around set of tasks to cgroup_subsys
452 struct cgroup_taskset
;
453 struct task_struct
*cgroup_taskset_first(struct cgroup_taskset
*tset
);
454 struct task_struct
*cgroup_taskset_next(struct cgroup_taskset
*tset
);
455 struct cgroup
*cgroup_taskset_cur_cgroup(struct cgroup_taskset
*tset
);
456 int cgroup_taskset_size(struct cgroup_taskset
*tset
);
459 * cgroup_taskset_for_each - iterate cgroup_taskset
460 * @task: the loop cursor
461 * @skip_cgrp: skip if task's cgroup matches this, %NULL to iterate through all
462 * @tset: taskset to iterate
464 #define cgroup_taskset_for_each(task, skip_cgrp, tset) \
465 for ((task) = cgroup_taskset_first((tset)); (task); \
466 (task) = cgroup_taskset_next((tset))) \
467 if (!(skip_cgrp) || \
468 cgroup_taskset_cur_cgroup((tset)) != (skip_cgrp))
471 * Control Group subsystem type.
472 * See Documentation/cgroups/cgroups.txt for details
475 struct cgroup_subsys
{
476 struct cgroup_subsys_state
*(*css_alloc
)(struct cgroup
*cgrp
);
477 int (*css_online
)(struct cgroup
*cgrp
);
478 void (*css_offline
)(struct cgroup
*cgrp
);
479 void (*css_free
)(struct cgroup
*cgrp
);
481 int (*can_attach
)(struct cgroup
*cgrp
, struct cgroup_taskset
*tset
);
482 void (*cancel_attach
)(struct cgroup
*cgrp
, struct cgroup_taskset
*tset
);
483 void (*attach
)(struct cgroup
*cgrp
, struct cgroup_taskset
*tset
);
484 void (*fork
)(struct task_struct
*task
);
485 void (*exit
)(struct cgroup
*cgrp
, struct cgroup
*old_cgrp
,
486 struct task_struct
*task
);
492 * True if this subsys uses ID. ID is not available before cgroup_init()
493 * (not available in early_init time.)
498 * If %false, this subsystem is properly hierarchical -
499 * configuration, resource accounting and restriction on a parent
500 * cgroup cover those of its children. If %true, hierarchy support
501 * is broken in some ways - some subsystems ignore hierarchy
502 * completely while others are only implemented half-way.
504 * It's now disallowed to create nested cgroups if the subsystem is
505 * broken and cgroup core will emit a warning message on such
506 * cases. Eventually, all subsystems will be made properly
507 * hierarchical and this will go away.
509 bool broken_hierarchy
;
510 bool warned_broken_hierarchy
;
512 #define MAX_CGROUP_TYPE_NAMELEN 32
516 * Link to parent, and list entry in parent's children.
517 * Protected by cgroup_lock()
519 struct cgroupfs_root
*root
;
520 struct list_head sibling
;
521 /* used when use_id == true */
525 /* list of cftype_sets */
526 struct list_head cftsets
;
528 /* base cftypes, automatically [de]registered with subsys itself */
529 struct cftype
*base_cftypes
;
530 struct cftype_set base_cftset
;
532 /* should be defined only by modular subsystems */
533 struct module
*module
;
536 #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
537 #define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
538 #include <linux/cgroup_subsys.h>
539 #undef IS_SUBSYS_ENABLED
542 static inline struct cgroup_subsys_state
*cgroup_subsys_state(
543 struct cgroup
*cgrp
, int subsys_id
)
545 return cgrp
->subsys
[subsys_id
];
549 * function to get the cgroup_subsys_state which allows for extra
550 * rcu_dereference_check() conditions, such as locks used during the
551 * cgroup_subsys::attach() methods.
553 #ifdef CONFIG_PROVE_RCU
554 extern struct mutex cgroup_mutex
;
555 #define task_subsys_state_check(task, subsys_id, __c) \
556 rcu_dereference_check((task)->cgroups->subsys[(subsys_id)], \
557 lockdep_is_held(&(task)->alloc_lock) || \
558 lockdep_is_held(&cgroup_mutex) || (__c))
560 #define task_subsys_state_check(task, subsys_id, __c) \
561 rcu_dereference((task)->cgroups->subsys[(subsys_id)])
564 static inline struct cgroup_subsys_state
*
565 task_subsys_state(struct task_struct
*task
, int subsys_id
)
567 return task_subsys_state_check(task
, subsys_id
, false);
570 static inline struct cgroup
* task_cgroup(struct task_struct
*task
,
573 return task_subsys_state(task
, subsys_id
)->cgroup
;
577 * cgroup_for_each_child - iterate through children of a cgroup
578 * @pos: the cgroup * to use as the loop cursor
579 * @cgroup: cgroup whose children to walk
581 * Walk @cgroup's children. Must be called under rcu_read_lock(). A child
582 * cgroup which hasn't finished ->css_online() or already has finished
583 * ->css_offline() may show up during traversal and it's each subsystem's
584 * responsibility to verify that each @pos is alive.
586 * If a subsystem synchronizes against the parent in its ->css_online() and
587 * before starting iterating, a cgroup which finished ->css_online() is
588 * guaranteed to be visible in the future iterations.
590 #define cgroup_for_each_child(pos, cgroup) \
591 list_for_each_entry_rcu(pos, &(cgroup)->children, sibling)
593 struct cgroup
*cgroup_next_descendant_pre(struct cgroup
*pos
,
594 struct cgroup
*cgroup
);
595 struct cgroup
*cgroup_rightmost_descendant(struct cgroup
*pos
);
598 * cgroup_for_each_descendant_pre - pre-order walk of a cgroup's descendants
599 * @pos: the cgroup * to use as the loop cursor
600 * @cgroup: cgroup whose descendants to walk
602 * Walk @cgroup's descendants. Must be called under rcu_read_lock(). A
603 * descendant cgroup which hasn't finished ->css_online() or already has
604 * finished ->css_offline() may show up during traversal and it's each
605 * subsystem's responsibility to verify that each @pos is alive.
607 * If a subsystem synchronizes against the parent in its ->css_online() and
608 * before starting iterating, and synchronizes against @pos on each
609 * iteration, any descendant cgroup which finished ->css_offline() is
610 * guaranteed to be visible in the future iterations.
612 * In other words, the following guarantees that a descendant can't escape
613 * state updates of its ancestors.
617 * Lock @cgrp->parent and @cgrp;
618 * Inherit state from @cgrp->parent;
622 * my_update_state(@cgrp)
625 * Update @cgrp's state;
628 * cgroup_for_each_descendant_pre(@pos, @cgrp) {
630 * Verify @pos is alive and inherit state from @pos->parent;
635 * As long as the inheriting step, including checking the parent state, is
636 * enclosed inside @pos locking, double-locking the parent isn't necessary
637 * while inheriting. The state update to the parent is guaranteed to be
638 * visible by walking order and, as long as inheriting operations to the
639 * same @pos are atomic to each other, multiple updates racing each other
640 * still result in the correct state. It's guaranateed that at least one
641 * inheritance happens for any cgroup after the latest update to its
644 * If checking parent's state requires locking the parent, each inheriting
645 * iteration should lock and unlock both @pos->parent and @pos.
647 * Alternatively, a subsystem may choose to use a single global lock to
648 * synchronize ->css_online() and ->css_offline() against tree-walking
651 #define cgroup_for_each_descendant_pre(pos, cgroup) \
652 for (pos = cgroup_next_descendant_pre(NULL, (cgroup)); (pos); \
653 pos = cgroup_next_descendant_pre((pos), (cgroup)))
655 struct cgroup
*cgroup_next_descendant_post(struct cgroup
*pos
,
656 struct cgroup
*cgroup
);
659 * cgroup_for_each_descendant_post - post-order walk of a cgroup's descendants
660 * @pos: the cgroup * to use as the loop cursor
661 * @cgroup: cgroup whose descendants to walk
663 * Similar to cgroup_for_each_descendant_pre() but performs post-order
664 * traversal instead. Note that the walk visibility guarantee described in
665 * pre-order walk doesn't apply the same to post-order walks.
667 #define cgroup_for_each_descendant_post(pos, cgroup) \
668 for (pos = cgroup_next_descendant_post(NULL, (cgroup)); (pos); \
669 pos = cgroup_next_descendant_post((pos), (cgroup)))
671 /* A cgroup_iter should be treated as an opaque object */
673 struct list_head
*cg_link
;
674 struct list_head
*task
;
678 * To iterate across the tasks in a cgroup:
680 * 1) call cgroup_iter_start to initialize an iterator
682 * 2) call cgroup_iter_next() to retrieve member tasks until it
683 * returns NULL or until you want to end the iteration
685 * 3) call cgroup_iter_end() to destroy the iterator.
687 * Or, call cgroup_scan_tasks() to iterate through every task in a
688 * cgroup - cgroup_scan_tasks() holds the css_set_lock when calling
689 * the test_task() callback, but not while calling the process_task()
692 void cgroup_iter_start(struct cgroup
*cgrp
, struct cgroup_iter
*it
);
693 struct task_struct
*cgroup_iter_next(struct cgroup
*cgrp
,
694 struct cgroup_iter
*it
);
695 void cgroup_iter_end(struct cgroup
*cgrp
, struct cgroup_iter
*it
);
696 int cgroup_scan_tasks(struct cgroup_scanner
*scan
);
697 int cgroup_attach_task_all(struct task_struct
*from
, struct task_struct
*);
698 int cgroup_transfer_tasks(struct cgroup
*to
, struct cgroup
*from
);
701 * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works
702 * if cgroup_subsys.use_id == true. It can be used for looking up and scanning.
703 * CSS ID is assigned at cgroup allocation (create) automatically
704 * and removed when subsys calls free_css_id() function. This is because
705 * the lifetime of cgroup_subsys_state is subsys's matter.
707 * Looking up and scanning function should be called under rcu_read_lock().
708 * Taking cgroup_mutex is not necessary for following calls.
709 * But the css returned by this routine can be "not populated yet" or "being
710 * destroyed". The caller should check css and cgroup's status.
714 * Typically Called at ->destroy(), or somewhere the subsys frees
715 * cgroup_subsys_state.
717 void free_css_id(struct cgroup_subsys
*ss
, struct cgroup_subsys_state
*css
);
719 /* Find a cgroup_subsys_state which has given ID */
721 struct cgroup_subsys_state
*css_lookup(struct cgroup_subsys
*ss
, int id
);
724 * Get a cgroup whose id is greater than or equal to id under tree of root.
725 * Returning a cgroup_subsys_state or NULL.
727 struct cgroup_subsys_state
*css_get_next(struct cgroup_subsys
*ss
, int id
,
728 struct cgroup_subsys_state
*root
, int *foundid
);
730 /* Returns true if root is ancestor of cg */
731 bool css_is_ancestor(struct cgroup_subsys_state
*cg
,
732 const struct cgroup_subsys_state
*root
);
734 /* Get id and depth of css */
735 unsigned short css_id(struct cgroup_subsys_state
*css
);
736 unsigned short css_depth(struct cgroup_subsys_state
*css
);
737 struct cgroup_subsys_state
*cgroup_css_from_dir(struct file
*f
, int id
);
739 #else /* !CONFIG_CGROUPS */
741 static inline int cgroup_init_early(void) { return 0; }
742 static inline int cgroup_init(void) { return 0; }
743 static inline void cgroup_fork(struct task_struct
*p
) {}
744 static inline void cgroup_post_fork(struct task_struct
*p
) {}
745 static inline void cgroup_exit(struct task_struct
*p
, int callbacks
) {}
747 static inline void cgroup_lock(void) {}
748 static inline void cgroup_unlock(void) {}
749 static inline int cgroupstats_build(struct cgroupstats
*stats
,
750 struct dentry
*dentry
)
755 /* No cgroups - nothing to do */
756 static inline int cgroup_attach_task_all(struct task_struct
*from
,
757 struct task_struct
*t
)
762 #endif /* !CONFIG_CGROUPS */
764 #endif /* _LINUX_CGROUP_H */