aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-06-25 21:05:21 -0400
committerTejun Heo <tj@kernel.org>2013-06-26 13:40:10 -0400
commiteb178d063324d9c30f673db3877b892a48ade21e (patch)
treebeb6a51e60b40c07f18cac6d1938aa8730416983 /kernel/cgroup.c
parent1672d040709b789671c0502e7aac9d632c2f9175 (diff)
cgroup: grab cgroup_mutex in drop_parsed_module_refcounts()
This isn't strictly necessary as all subsystems specified in @subsys_mask are guaranteed to be pinned; however, it does spuriously trigger lockdep warning. Let's grab cgroup_mutex around it. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e801ecfa36ef..2d3a132e881d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1325,11 +1325,11 @@ static void drop_parsed_module_refcounts(unsigned long subsys_mask)
1325 struct cgroup_subsys *ss; 1325 struct cgroup_subsys *ss;
1326 int i; 1326 int i;
1327 1327
1328 for_each_subsys(ss, i) { 1328 mutex_lock(&cgroup_mutex);
1329 if (!(subsys_mask & (1UL << i))) 1329 for_each_subsys(ss, i)
1330 continue; 1330 if (subsys_mask & (1UL << i))
1331 module_put(cgroup_subsys[i]->module); 1331 module_put(cgroup_subsys[i]->module);
1332 } 1332 mutex_unlock(&cgroup_mutex);
1333} 1333}
1334 1334
1335static int cgroup_remount(struct super_block *sb, int *flags, char *data) 1335static int cgroup_remount(struct super_block *sb, int *flags, char *data)