Merge tag 'kvmarm-fixes-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmar...
[linux-2.6-microblaze.git] / kernel / cgroup / cgroup-v1.c
index ff6a809..52bb5a7 100644 (file)
@@ -59,8 +59,7 @@ int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)
        int retval = 0;
 
        mutex_lock(&cgroup_mutex);
-       cpus_read_lock();
-       percpu_down_write(&cgroup_threadgroup_rwsem);
+       cgroup_attach_lock(true);
        for_each_root(root) {
                struct cgroup *from_cgrp;
 
@@ -72,8 +71,7 @@ int cgroup_attach_task_all(struct task_struct *from, struct task_struct *tsk)
                if (retval)
                        break;
        }
-       percpu_up_write(&cgroup_threadgroup_rwsem);
-       cpus_read_unlock();
+       cgroup_attach_unlock(true);
        mutex_unlock(&cgroup_mutex);
 
        return retval;