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>
        struct cgroup_subsys *ss;
        int i;
 
-       for_each_subsys(ss, i) {
-               if (!(subsys_mask & (1UL << i)))
-                       continue;
-               module_put(cgroup_subsys[i]->module);
-       }
+       mutex_lock(&cgroup_mutex);
+       for_each_subsys(ss, i)
+               if (subsys_mask & (1UL << i))
+                       module_put(cgroup_subsys[i]->module);
+       mutex_unlock(&cgroup_mutex);
 }
 
 static int cgroup_remount(struct super_block *sb, int *flags, char *data)