diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 73d1c730c3c4..ce1c1f34c30c 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -340,8 +340,23 @@ struct cgroup_subsys { | |||
340 | #define MAX_CGROUP_TYPE_NAMELEN 32 | 340 | #define MAX_CGROUP_TYPE_NAMELEN 32 |
341 | const char *name; | 341 | const char *name; |
342 | 342 | ||
343 | struct cgroupfs_root *root; | 343 | /* |
344 | * Protects sibling/children links of cgroups in this | ||
345 | * hierarchy, plus protects which hierarchy (or none) the | ||
346 | * subsystem is a part of (i.e. root/sibling). To avoid | ||
347 | * potential deadlocks, the following operations should not be | ||
348 | * undertaken while holding any hierarchy_mutex: | ||
349 | * | ||
350 | * - allocating memory | ||
351 | * - initiating hotplug events | ||
352 | */ | ||
353 | struct mutex hierarchy_mutex; | ||
344 | 354 | ||
355 | /* | ||
356 | * Link to parent, and list entry in parent's children. | ||
357 | * Protected by this->hierarchy_mutex and cgroup_lock() | ||
358 | */ | ||
359 | struct cgroupfs_root *root; | ||
345 | struct list_head sibling; | 360 | struct list_head sibling; |
346 | }; | 361 | }; |
347 | 362 | ||