summaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-08-13 11:01:55 -0400
committerTejun Heo <tj@kernel.org>2013-08-13 11:01:55 -0400
commit73e80ed8007fc48a6deeb295ba37159fad274bd2 (patch)
treec4f430a223725038cb85be6ee0e13578d831c929 /include/linux/cgroup.h
parent105347ba5da3e87facce2337c50cd5df93cc6bec (diff)
downloadlinux-73e80ed8007fc48a6deeb295ba37159fad274bd2.tar.gz
linux-73e80ed8007fc48a6deeb295ba37159fad274bd2.tar.bz2
linux-73e80ed8007fc48a6deeb295ba37159fad274bd2.zip
cgroup: add __rcu modifier to cgroup->subsys[]
For the planned unified hierarchy, each css (cgroup_subsys_state) will be RCU protected so that it can be created and destroyed individually while allowing RCU accesses. Previous changes ensured that all cgroup->subsys[] accesses use the cgroup_css() accessor. This patch adds __rcu modifier to cgroup->subsys[], add matching RCU dereference in cgroup_css() and convert all assignments to either rcu_assign_pointer() or RCU_INIT_POINTER(). This change prepares for the actual RCUfication of css's and doesn't introduce any visible behavior change. The conversion is verified with sparse and all accesses are properly RCU annotated. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 8a5dc91fbaad..eb200b5794e7 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -204,7 +204,7 @@ struct cgroup {
struct cgroup_name __rcu *name;
/* Private pointers for each registered subsystem */
- struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
+ struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT];
struct cgroupfs_root *root;