diff options
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index be81fafae11f..565c8034e6c8 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/prio_heap.h> | 16 | #include <linux/prio_heap.h> |
17 | #include <linux/rwsem.h> | 17 | #include <linux/rwsem.h> |
18 | #include <linux/idr.h> | 18 | #include <linux/idr.h> |
19 | #include <linux/workqueue.h> | ||
19 | 20 | ||
20 | #ifdef CONFIG_CGROUPS | 21 | #ifdef CONFIG_CGROUPS |
21 | 22 | ||
@@ -76,12 +77,16 @@ struct cgroup_subsys_state { | |||
76 | unsigned long flags; | 77 | unsigned long flags; |
77 | /* ID for this css, if possible */ | 78 | /* ID for this css, if possible */ |
78 | struct css_id __rcu *id; | 79 | struct css_id __rcu *id; |
80 | |||
81 | /* Used to put @cgroup->dentry on the last css_put() */ | ||
82 | struct work_struct dput_work; | ||
79 | }; | 83 | }; |
80 | 84 | ||
81 | /* bits in struct cgroup_subsys_state flags field */ | 85 | /* bits in struct cgroup_subsys_state flags field */ |
82 | enum { | 86 | enum { |
83 | CSS_ROOT, /* This CSS is the root of the subsystem */ | 87 | CSS_ROOT, /* This CSS is the root of the subsystem */ |
84 | CSS_REMOVED, /* This CSS is dead */ | 88 | CSS_REMOVED, /* This CSS is dead */ |
89 | CSS_CLEAR_CSS_REFS, /* @ss->__DEPRECATED_clear_css_refs */ | ||
85 | }; | 90 | }; |
86 | 91 | ||
87 | /* Caller must verify that the css is not for root cgroup */ | 92 | /* Caller must verify that the css is not for root cgroup */ |
@@ -480,6 +485,18 @@ struct cgroup_subsys { | |||
480 | * (not available in early_init time.) | 485 | * (not available in early_init time.) |
481 | */ | 486 | */ |
482 | bool use_id; | 487 | bool use_id; |
488 | |||
489 | /* | ||
490 | * If %true, cgroup removal will try to clear css refs by retrying | ||
491 | * ss->pre_destroy() until there's no css ref left. This behavior | ||
492 | * is strictly for backward compatibility and will be removed as | ||
493 | * soon as the current user (memcg) is updated. | ||
494 | * | ||
495 | * If %false, ss->pre_destroy() can't fail and cgroup removal won't | ||
496 | * wait for css refs to drop to zero before proceeding. | ||
497 | */ | ||
498 | bool __DEPRECATED_clear_css_refs; | ||
499 | |||
483 | #define MAX_CGROUP_TYPE_NAMELEN 32 | 500 | #define MAX_CGROUP_TYPE_NAMELEN 32 |
484 | const char *name; | 501 | const char *name; |
485 | 502 | ||