diff options
-rw-r--r-- | block/blk-cgroup.h | 5 | ||||
-rw-r--r-- | fs/bio.c | 2 | ||||
-rw-r--r-- | include/linux/cgroup.h | 31 | ||||
-rw-r--r-- | include/net/cls_cgroup.h | 4 | ||||
-rw-r--r-- | include/net/netprio_cgroup.h | 4 | ||||
-rw-r--r-- | kernel/cgroup.c | 2 | ||||
-rw-r--r-- | kernel/cgroup_freezer.c | 4 | ||||
-rw-r--r-- | kernel/cpuset.c | 6 | ||||
-rw-r--r-- | kernel/events/core.c | 6 | ||||
-rw-r--r-- | kernel/sched/core.c | 4 | ||||
-rw-r--r-- | kernel/sched/cpuacct.c | 4 | ||||
-rw-r--r-- | kernel/sched/sched.h | 6 | ||||
-rw-r--r-- | mm/hugetlb_cgroup.c | 6 | ||||
-rw-r--r-- | mm/memcontrol.c | 5 | ||||
-rw-r--r-- | mm/vmpressure.c | 2 | ||||
-rw-r--r-- | net/core/netprio_cgroup.c | 2 | ||||
-rw-r--r-- | net/sched/cls_cgroup.c | 4 | ||||
-rw-r--r-- | security/device_cgroup.c | 4 |
18 files changed, 52 insertions, 49 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 8056c03a3382..628e50f6f8a8 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -181,14 +181,13 @@ void blkg_conf_finish(struct blkg_conf_ctx *ctx); | |||
181 | 181 | ||
182 | static inline struct blkcg *cgroup_to_blkcg(struct cgroup *cgroup) | 182 | static inline struct blkcg *cgroup_to_blkcg(struct cgroup *cgroup) |
183 | { | 183 | { |
184 | return container_of(cgroup_subsys_state(cgroup, blkio_subsys_id), | 184 | return container_of(cgroup_css(cgroup, blkio_subsys_id), |
185 | struct blkcg, css); | 185 | struct blkcg, css); |
186 | } | 186 | } |
187 | 187 | ||
188 | static inline struct blkcg *task_blkcg(struct task_struct *tsk) | 188 | static inline struct blkcg *task_blkcg(struct task_struct *tsk) |
189 | { | 189 | { |
190 | return container_of(task_subsys_state(tsk, blkio_subsys_id), | 190 | return container_of(task_css(tsk, blkio_subsys_id), struct blkcg, css); |
191 | struct blkcg, css); | ||
192 | } | 191 | } |
193 | 192 | ||
194 | static inline struct blkcg *bio_blkcg(struct bio *bio) | 193 | static inline struct blkcg *bio_blkcg(struct bio *bio) |
@@ -1946,7 +1946,7 @@ int bio_associate_current(struct bio *bio) | |||
1946 | 1946 | ||
1947 | /* associate blkcg if exists */ | 1947 | /* associate blkcg if exists */ |
1948 | rcu_read_lock(); | 1948 | rcu_read_lock(); |
1949 | css = task_subsys_state(current, blkio_subsys_id); | 1949 | css = task_css(current, blkio_subsys_id); |
1950 | if (css && css_tryget(css)) | 1950 | if (css && css_tryget(css)) |
1951 | bio->bi_css = css; | 1951 | bio->bi_css = css; |
1952 | rcu_read_unlock(); | 1952 | rcu_read_unlock(); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 44dd422d7e9b..552c5feef733 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -647,8 +647,15 @@ struct cgroup_subsys { | |||
647 | #undef IS_SUBSYS_ENABLED | 647 | #undef IS_SUBSYS_ENABLED |
648 | #undef SUBSYS | 648 | #undef SUBSYS |
649 | 649 | ||
650 | static inline struct cgroup_subsys_state *cgroup_subsys_state( | 650 | /** |
651 | struct cgroup *cgrp, int subsys_id) | 651 | * cgroup_css - obtain a cgroup's css for the specified subsystem |
652 | * @cgrp: the cgroup of interest | ||
653 | * @subsys_id: the subsystem of interest | ||
654 | * | ||
655 | * Return @cgrp's css (cgroup_subsys_state) associated with @subsys_id. | ||
656 | */ | ||
657 | static inline struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp, | ||
658 | int subsys_id) | ||
652 | { | 659 | { |
653 | return cgrp->subsys[subsys_id]; | 660 | return cgrp->subsys[subsys_id]; |
654 | } | 661 | } |
@@ -678,7 +685,7 @@ extern struct mutex cgroup_mutex; | |||
678 | #endif | 685 | #endif |
679 | 686 | ||
680 | /** | 687 | /** |
681 | * task_subsys_state_check - obtain css for (task, subsys) w/ extra access conds | 688 | * task_css_check - obtain css for (task, subsys) w/ extra access conds |
682 | * @task: the target task | 689 | * @task: the target task |
683 | * @subsys_id: the target subsystem ID | 690 | * @subsys_id: the target subsystem ID |
684 | * @__c: extra condition expression to be passed to rcu_dereference_check() | 691 | * @__c: extra condition expression to be passed to rcu_dereference_check() |
@@ -686,7 +693,7 @@ extern struct mutex cgroup_mutex; | |||
686 | * Return the cgroup_subsys_state for the (@task, @subsys_id) pair. The | 693 | * Return the cgroup_subsys_state for the (@task, @subsys_id) pair. The |
687 | * synchronization rules are the same as task_css_set_check(). | 694 | * synchronization rules are the same as task_css_set_check(). |
688 | */ | 695 | */ |
689 | #define task_subsys_state_check(task, subsys_id, __c) \ | 696 | #define task_css_check(task, subsys_id, __c) \ |
690 | task_css_set_check((task), (__c))->subsys[(subsys_id)] | 697 | task_css_set_check((task), (__c))->subsys[(subsys_id)] |
691 | 698 | ||
692 | /** | 699 | /** |
@@ -701,22 +708,22 @@ static inline struct css_set *task_css_set(struct task_struct *task) | |||
701 | } | 708 | } |
702 | 709 | ||
703 | /** | 710 | /** |
704 | * task_subsys_state - obtain css for (task, subsys) | 711 | * task_css - obtain css for (task, subsys) |
705 | * @task: the target task | 712 | * @task: the target task |
706 | * @subsys_id: the target subsystem ID | 713 | * @subsys_id: the target subsystem ID |
707 | * | 714 | * |
708 | * See task_subsys_state_check(). | 715 | * See task_css_check(). |
709 | */ | 716 | */ |
710 | static inline struct cgroup_subsys_state * | 717 | static inline struct cgroup_subsys_state *task_css(struct task_struct *task, |
711 | task_subsys_state(struct task_struct *task, int subsys_id) | 718 | int subsys_id) |
712 | { | 719 | { |
713 | return task_subsys_state_check(task, subsys_id, false); | 720 | return task_css_check(task, subsys_id, false); |
714 | } | 721 | } |
715 | 722 | ||
716 | static inline struct cgroup* task_cgroup(struct task_struct *task, | 723 | static inline struct cgroup *task_cgroup(struct task_struct *task, |
717 | int subsys_id) | 724 | int subsys_id) |
718 | { | 725 | { |
719 | return task_subsys_state(task, subsys_id)->cgroup; | 726 | return task_css(task, subsys_id)->cgroup; |
720 | } | 727 | } |
721 | 728 | ||
722 | /** | 729 | /** |
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index 0fee0617fb7d..52adaa75dac9 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
@@ -35,7 +35,7 @@ static inline u32 task_cls_classid(struct task_struct *p) | |||
35 | return 0; | 35 | return 0; |
36 | 36 | ||
37 | rcu_read_lock(); | 37 | rcu_read_lock(); |
38 | classid = container_of(task_subsys_state(p, net_cls_subsys_id), | 38 | classid = container_of(task_css(p, net_cls_subsys_id), |
39 | struct cgroup_cls_state, css)->classid; | 39 | struct cgroup_cls_state, css)->classid; |
40 | rcu_read_unlock(); | 40 | rcu_read_unlock(); |
41 | 41 | ||
@@ -51,7 +51,7 @@ static inline u32 task_cls_classid(struct task_struct *p) | |||
51 | return 0; | 51 | return 0; |
52 | 52 | ||
53 | rcu_read_lock(); | 53 | rcu_read_lock(); |
54 | css = task_subsys_state(p, net_cls_subsys_id); | 54 | css = task_css(p, net_cls_subsys_id); |
55 | if (css) | 55 | if (css) |
56 | classid = container_of(css, | 56 | classid = container_of(css, |
57 | struct cgroup_cls_state, css)->classid; | 57 | struct cgroup_cls_state, css)->classid; |
diff --git a/include/net/netprio_cgroup.h b/include/net/netprio_cgroup.h index 50ab8c26ab59..8110fa7ae60a 100644 --- a/include/net/netprio_cgroup.h +++ b/include/net/netprio_cgroup.h | |||
@@ -39,7 +39,7 @@ static inline u32 task_netprioidx(struct task_struct *p) | |||
39 | u32 idx; | 39 | u32 idx; |
40 | 40 | ||
41 | rcu_read_lock(); | 41 | rcu_read_lock(); |
42 | css = task_subsys_state(p, net_prio_subsys_id); | 42 | css = task_css(p, net_prio_subsys_id); |
43 | idx = css->cgroup->id; | 43 | idx = css->cgroup->id; |
44 | rcu_read_unlock(); | 44 | rcu_read_unlock(); |
45 | return idx; | 45 | return idx; |
@@ -53,7 +53,7 @@ static inline u32 task_netprioidx(struct task_struct *p) | |||
53 | u32 idx = 0; | 53 | u32 idx = 0; |
54 | 54 | ||
55 | rcu_read_lock(); | 55 | rcu_read_lock(); |
56 | css = task_subsys_state(p, net_prio_subsys_id); | 56 | css = task_css(p, net_prio_subsys_id); |
57 | if (css) | 57 | if (css) |
58 | idx = css->cgroup->id; | 58 | idx = css->cgroup->id; |
59 | rcu_read_unlock(); | 59 | rcu_read_unlock(); |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ae4c46834633..0b3caa3220cb 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -81,7 +81,7 @@ | |||
81 | */ | 81 | */ |
82 | #ifdef CONFIG_PROVE_RCU | 82 | #ifdef CONFIG_PROVE_RCU |
83 | DEFINE_MUTEX(cgroup_mutex); | 83 | DEFINE_MUTEX(cgroup_mutex); |
84 | EXPORT_SYMBOL_GPL(cgroup_mutex); /* only for task_subsys_state_check() */ | 84 | EXPORT_SYMBOL_GPL(cgroup_mutex); /* only for lockdep */ |
85 | #else | 85 | #else |
86 | static DEFINE_MUTEX(cgroup_mutex); | 86 | static DEFINE_MUTEX(cgroup_mutex); |
87 | #endif | 87 | #endif |
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index 75dda1ea5026..9d3f61566fec 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c | |||
@@ -47,13 +47,13 @@ struct freezer { | |||
47 | 47 | ||
48 | static inline struct freezer *cgroup_freezer(struct cgroup *cgroup) | 48 | static inline struct freezer *cgroup_freezer(struct cgroup *cgroup) |
49 | { | 49 | { |
50 | return container_of(cgroup_subsys_state(cgroup, freezer_subsys_id), | 50 | return container_of(cgroup_css(cgroup, freezer_subsys_id), |
51 | struct freezer, css); | 51 | struct freezer, css); |
52 | } | 52 | } |
53 | 53 | ||
54 | static inline struct freezer *task_freezer(struct task_struct *task) | 54 | static inline struct freezer *task_freezer(struct task_struct *task) |
55 | { | 55 | { |
56 | return container_of(task_subsys_state(task, freezer_subsys_id), | 56 | return container_of(task_css(task, freezer_subsys_id), |
57 | struct freezer, css); | 57 | struct freezer, css); |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 1b9c31549797..be4512ba2c0c 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -117,14 +117,14 @@ struct cpuset { | |||
117 | /* Retrieve the cpuset for a cgroup */ | 117 | /* Retrieve the cpuset for a cgroup */ |
118 | static inline struct cpuset *cgroup_cs(struct cgroup *cgrp) | 118 | static inline struct cpuset *cgroup_cs(struct cgroup *cgrp) |
119 | { | 119 | { |
120 | return container_of(cgroup_subsys_state(cgrp, cpuset_subsys_id), | 120 | return container_of(cgroup_css(cgrp, cpuset_subsys_id), |
121 | struct cpuset, css); | 121 | struct cpuset, css); |
122 | } | 122 | } |
123 | 123 | ||
124 | /* Retrieve the cpuset for a task */ | 124 | /* Retrieve the cpuset for a task */ |
125 | static inline struct cpuset *task_cs(struct task_struct *task) | 125 | static inline struct cpuset *task_cs(struct task_struct *task) |
126 | { | 126 | { |
127 | return container_of(task_subsys_state(task, cpuset_subsys_id), | 127 | return container_of(task_css(task, cpuset_subsys_id), |
128 | struct cpuset, css); | 128 | struct cpuset, css); |
129 | } | 129 | } |
130 | 130 | ||
@@ -2724,7 +2724,7 @@ int proc_cpuset_show(struct seq_file *m, void *unused_v) | |||
2724 | goto out_free; | 2724 | goto out_free; |
2725 | 2725 | ||
2726 | rcu_read_lock(); | 2726 | rcu_read_lock(); |
2727 | css = task_subsys_state(tsk, cpuset_subsys_id); | 2727 | css = task_css(tsk, cpuset_subsys_id); |
2728 | retval = cgroup_path(css->cgroup, buf, PAGE_SIZE); | 2728 | retval = cgroup_path(css->cgroup, buf, PAGE_SIZE); |
2729 | rcu_read_unlock(); | 2729 | rcu_read_unlock(); |
2730 | if (retval < 0) | 2730 | if (retval < 0) |
diff --git a/kernel/events/core.c b/kernel/events/core.c index 1833bc5a84a7..414c61f4d776 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -340,8 +340,8 @@ struct perf_cgroup { | |||
340 | static inline struct perf_cgroup * | 340 | static inline struct perf_cgroup * |
341 | perf_cgroup_from_task(struct task_struct *task) | 341 | perf_cgroup_from_task(struct task_struct *task) |
342 | { | 342 | { |
343 | return container_of(task_subsys_state(task, perf_subsys_id), | 343 | return container_of(task_css(task, perf_subsys_id), |
344 | struct perf_cgroup, css); | 344 | struct perf_cgroup, css); |
345 | } | 345 | } |
346 | 346 | ||
347 | static inline bool | 347 | static inline bool |
@@ -7798,7 +7798,7 @@ static struct cgroup_subsys_state *perf_cgroup_css_alloc(struct cgroup *cont) | |||
7798 | static void perf_cgroup_css_free(struct cgroup *cont) | 7798 | static void perf_cgroup_css_free(struct cgroup *cont) |
7799 | { | 7799 | { |
7800 | struct perf_cgroup *jc; | 7800 | struct perf_cgroup *jc; |
7801 | jc = container_of(cgroup_subsys_state(cont, perf_subsys_id), | 7801 | jc = container_of(cgroup_css(cont, perf_subsys_id), |
7802 | struct perf_cgroup, css); | 7802 | struct perf_cgroup, css); |
7803 | free_percpu(jc->info); | 7803 | free_percpu(jc->info); |
7804 | kfree(jc); | 7804 | kfree(jc); |
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 9b1f2e533b95..323d907eac1a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -6761,7 +6761,7 @@ void sched_move_task(struct task_struct *tsk) | |||
6761 | if (unlikely(running)) | 6761 | if (unlikely(running)) |
6762 | tsk->sched_class->put_prev_task(rq, tsk); | 6762 | tsk->sched_class->put_prev_task(rq, tsk); |
6763 | 6763 | ||
6764 | tg = container_of(task_subsys_state_check(tsk, cpu_cgroup_subsys_id, | 6764 | tg = container_of(task_css_check(tsk, cpu_cgroup_subsys_id, |
6765 | lockdep_is_held(&tsk->sighand->siglock)), | 6765 | lockdep_is_held(&tsk->sighand->siglock)), |
6766 | struct task_group, css); | 6766 | struct task_group, css); |
6767 | tg = autogroup_task_group(tsk, tg); | 6767 | tg = autogroup_task_group(tsk, tg); |
@@ -7086,7 +7086,7 @@ int sched_rt_handler(struct ctl_table *table, int write, | |||
7086 | /* return corresponding task_group object of a cgroup */ | 7086 | /* return corresponding task_group object of a cgroup */ |
7087 | static inline struct task_group *cgroup_tg(struct cgroup *cgrp) | 7087 | static inline struct task_group *cgroup_tg(struct cgroup *cgrp) |
7088 | { | 7088 | { |
7089 | return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id), | 7089 | return container_of(cgroup_css(cgrp, cpu_cgroup_subsys_id), |
7090 | struct task_group, css); | 7090 | struct task_group, css); |
7091 | } | 7091 | } |
7092 | 7092 | ||
diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index dbb7e2cd95eb..4a210faaab77 100644 --- a/kernel/sched/cpuacct.c +++ b/kernel/sched/cpuacct.c | |||
@@ -36,14 +36,14 @@ struct cpuacct { | |||
36 | /* return cpu accounting group corresponding to this container */ | 36 | /* return cpu accounting group corresponding to this container */ |
37 | static inline struct cpuacct *cgroup_ca(struct cgroup *cgrp) | 37 | static inline struct cpuacct *cgroup_ca(struct cgroup *cgrp) |
38 | { | 38 | { |
39 | return container_of(cgroup_subsys_state(cgrp, cpuacct_subsys_id), | 39 | return container_of(cgroup_css(cgrp, cpuacct_subsys_id), |
40 | struct cpuacct, css); | 40 | struct cpuacct, css); |
41 | } | 41 | } |
42 | 42 | ||
43 | /* return cpu accounting group to which this task belongs */ | 43 | /* return cpu accounting group to which this task belongs */ |
44 | static inline struct cpuacct *task_ca(struct task_struct *tsk) | 44 | static inline struct cpuacct *task_ca(struct task_struct *tsk) |
45 | { | 45 | { |
46 | return container_of(task_subsys_state(tsk, cpuacct_subsys_id), | 46 | return container_of(task_css(tsk, cpuacct_subsys_id), |
47 | struct cpuacct, css); | 47 | struct cpuacct, css); |
48 | } | 48 | } |
49 | 49 | ||
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index ef0a7b2439dd..471a56db05ea 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -665,9 +665,9 @@ extern int group_balance_cpu(struct sched_group *sg); | |||
665 | /* | 665 | /* |
666 | * Return the group to which this tasks belongs. | 666 | * Return the group to which this tasks belongs. |
667 | * | 667 | * |
668 | * We cannot use task_subsys_state() and friends because the cgroup | 668 | * We cannot use task_css() and friends because the cgroup subsystem |
669 | * subsystem changes that value before the cgroup_subsys::attach() method | 669 | * changes that value before the cgroup_subsys::attach() method is called, |
670 | * is called, therefore we cannot pin it and might observe the wrong value. | 670 | * therefore we cannot pin it and might observe the wrong value. |
671 | * | 671 | * |
672 | * The same is true for autogroup's p->signal->autogroup->tg, the autogroup | 672 | * The same is true for autogroup's p->signal->autogroup->tg, the autogroup |
673 | * core changes this before calling sched_move_task(). | 673 | * core changes this before calling sched_move_task(). |
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c index 9cea7de22ffb..50f213fc52c7 100644 --- a/mm/hugetlb_cgroup.c +++ b/mm/hugetlb_cgroup.c | |||
@@ -42,15 +42,13 @@ struct hugetlb_cgroup *hugetlb_cgroup_from_css(struct cgroup_subsys_state *s) | |||
42 | static inline | 42 | static inline |
43 | struct hugetlb_cgroup *hugetlb_cgroup_from_cgroup(struct cgroup *cgroup) | 43 | struct hugetlb_cgroup *hugetlb_cgroup_from_cgroup(struct cgroup *cgroup) |
44 | { | 44 | { |
45 | return hugetlb_cgroup_from_css(cgroup_subsys_state(cgroup, | 45 | return hugetlb_cgroup_from_css(cgroup_css(cgroup, hugetlb_subsys_id)); |
46 | hugetlb_subsys_id)); | ||
47 | } | 46 | } |
48 | 47 | ||
49 | static inline | 48 | static inline |
50 | struct hugetlb_cgroup *hugetlb_cgroup_from_task(struct task_struct *task) | 49 | struct hugetlb_cgroup *hugetlb_cgroup_from_task(struct task_struct *task) |
51 | { | 50 | { |
52 | return hugetlb_cgroup_from_css(task_subsys_state(task, | 51 | return hugetlb_cgroup_from_css(task_css(task, hugetlb_subsys_id)); |
53 | hugetlb_subsys_id)); | ||
54 | } | 52 | } |
55 | 53 | ||
56 | static inline bool hugetlb_cgroup_is_root(struct hugetlb_cgroup *h_cg) | 54 | static inline bool hugetlb_cgroup_is_root(struct hugetlb_cgroup *h_cg) |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d12ca6f3c293..b47bd3ad3c2b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1037,8 +1037,7 @@ static void memcg_check_events(struct mem_cgroup *memcg, struct page *page) | |||
1037 | 1037 | ||
1038 | struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont) | 1038 | struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont) |
1039 | { | 1039 | { |
1040 | return mem_cgroup_from_css( | 1040 | return mem_cgroup_from_css(cgroup_css(cont, mem_cgroup_subsys_id)); |
1041 | cgroup_subsys_state(cont, mem_cgroup_subsys_id)); | ||
1042 | } | 1041 | } |
1043 | 1042 | ||
1044 | struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p) | 1043 | struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p) |
@@ -1051,7 +1050,7 @@ struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p) | |||
1051 | if (unlikely(!p)) | 1050 | if (unlikely(!p)) |
1052 | return NULL; | 1051 | return NULL; |
1053 | 1052 | ||
1054 | return mem_cgroup_from_css(task_subsys_state(p, mem_cgroup_subsys_id)); | 1053 | return mem_cgroup_from_css(task_css(p, mem_cgroup_subsys_id)); |
1055 | } | 1054 | } |
1056 | 1055 | ||
1057 | struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) | 1056 | struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) |
diff --git a/mm/vmpressure.c b/mm/vmpressure.c index 736a6011c2c8..7f1654d3cec7 100644 --- a/mm/vmpressure.c +++ b/mm/vmpressure.c | |||
@@ -76,7 +76,7 @@ static struct vmpressure *work_to_vmpressure(struct work_struct *work) | |||
76 | 76 | ||
77 | static struct vmpressure *cg_to_vmpressure(struct cgroup *cg) | 77 | static struct vmpressure *cg_to_vmpressure(struct cgroup *cg) |
78 | { | 78 | { |
79 | return css_to_vmpressure(cgroup_subsys_state(cg, mem_cgroup_subsys_id)); | 79 | return css_to_vmpressure(cgroup_css(cg, mem_cgroup_subsys_id)); |
80 | } | 80 | } |
81 | 81 | ||
82 | static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr) | 82 | static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr) |
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index e533259dce3c..ccf852311987 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | static inline struct cgroup_netprio_state *cgrp_netprio_state(struct cgroup *cgrp) | 32 | static inline struct cgroup_netprio_state *cgrp_netprio_state(struct cgroup *cgrp) |
33 | { | 33 | { |
34 | return container_of(cgroup_subsys_state(cgrp, net_prio_subsys_id), | 34 | return container_of(cgroup_css(cgrp, net_prio_subsys_id), |
35 | struct cgroup_netprio_state, css); | 35 | struct cgroup_netprio_state, css); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index 3a294eb98d61..5ee72a001df0 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c | |||
@@ -25,13 +25,13 @@ | |||
25 | 25 | ||
26 | static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp) | 26 | static inline struct cgroup_cls_state *cgrp_cls_state(struct cgroup *cgrp) |
27 | { | 27 | { |
28 | return container_of(cgroup_subsys_state(cgrp, net_cls_subsys_id), | 28 | return container_of(cgroup_css(cgrp, net_cls_subsys_id), |
29 | struct cgroup_cls_state, css); | 29 | struct cgroup_cls_state, css); |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p) | 32 | static inline struct cgroup_cls_state *task_cls_state(struct task_struct *p) |
33 | { | 33 | { |
34 | return container_of(task_subsys_state(p, net_cls_subsys_id), | 34 | return container_of(task_css(p, net_cls_subsys_id), |
35 | struct cgroup_cls_state, css); | 35 | struct cgroup_cls_state, css); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/security/device_cgroup.c b/security/device_cgroup.c index e8aad69f0d69..87a0a037fbd6 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c | |||
@@ -58,12 +58,12 @@ static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s) | |||
58 | 58 | ||
59 | static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup) | 59 | static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup) |
60 | { | 60 | { |
61 | return css_to_devcgroup(cgroup_subsys_state(cgroup, devices_subsys_id)); | 61 | return css_to_devcgroup(cgroup_css(cgroup, devices_subsys_id)); |
62 | } | 62 | } |
63 | 63 | ||
64 | static inline struct dev_cgroup *task_devcgroup(struct task_struct *task) | 64 | static inline struct dev_cgroup *task_devcgroup(struct task_struct *task) |
65 | { | 65 | { |
66 | return css_to_devcgroup(task_subsys_state(task, devices_subsys_id)); | 66 | return css_to_devcgroup(task_css(task, devices_subsys_id)); |
67 | } | 67 | } |
68 | 68 | ||
69 | struct cgroup_subsys devices_subsys; | 69 | struct cgroup_subsys devices_subsys; |